add test for getKeyboardResponse can return a lower case version of the key in some circumstances #3325

This commit is contained in:
Josh de Leeuw 2024-07-11 10:05:41 -04:00
parent 5736dbb97f
commit 2889e854a0

View File

@ -81,6 +81,18 @@ describe("#getKeyboardResponse", () => {
await keyUp("a");
});
test("should return the key in standard capitalization (issue #3325)", async () => {
const api = new KeyboardListenerAPI(getRootElement);
api.getKeyboardResponse({
callback_function: callback,
valid_responses: ["enter"],
});
await pressKey("Enter");
expect(callback).toHaveBeenCalledWith("Enter");
});
describe("when case_sensitive_responses is false", () => {
let api: KeyboardListenerAPI;