OpenHands
OpenHands copied to clipboard
test(frontend): create new test and update existing ones
This is updating the relevant tests for the changes made by #1169.
@rbren If you can confirm that the expected behavior for your getUpdatedSettings function sets undefined values for keys that have not been modified. For example:
const oldSettings = {
[ArgConfigType.LLM_MODEL]: "gpt-4-0125-preview",
[ArgConfigType.AGENT]: "MonologueAgent",
[ArgConfigType.LANGUAGE]: "en",
};
const newSettings = {
[ArgConfigType.AGENT]: "OtherAgent",
};
const result = getUpdatedSettings(newSettings, oldSettings);
result is actually:
Object {
"AGENT": "OtherAgent",
"LANGUAGE": undefined,
"LLM_MODEL": undefined,
}
If this is the expected behavior, then the test file is OK. If not, let me know so I can make the appropriate changes to the test file to reflect the proper behavior.
Let me know if I'm missing a specific edge case in the test files.
@amanape I think it'd be better if those keys just weren't present. (Honestly I expected || undefined to work that way! 😬)