aboutsummaryrefslogtreecommitdiffstats
path: root/test/jsUtils.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/jsUtils.test.ts')
-rw-r--r--test/jsUtils.test.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/jsUtils.test.ts b/test/jsUtils.test.ts
index 8ef69b46f..406326d4b 100644
--- a/test/jsUtils.test.ts
+++ b/test/jsUtils.test.ts
@@ -110,4 +110,16 @@ describe('jsUtils', () => {
110 expect(result).toEqual([{ a: 'b' }, { c: 'd' }]); 110 expect(result).toEqual([{ a: 'b' }, { c: 'd' }]);
111 }); 111 });
112 }); 112 });
113
114 describe('isEscKeyPress', () => {
115 it('returns true if the key number is 27', () => {
116 const result = jsUtils.isEscKeyPress(27);
117 expect(result).toEqual(true);
118 });
119
120 it('returns false if the key number is 27', () => {
121 const result = jsUtils.isEscKeyPress(28);
122 expect(result).toEqual(false);
123 });
124 });
113}); 125});