aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2023-05-28 22:11:03 +0530
committerLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2023-05-28 22:25:33 +0530
commitb631f0f664dc85c81032b02eebdd8eb1e8796a81 (patch)
treee4a50a32f7836953c0a6af34389fe9898e24215a /test
parentFix issues reported by sonarqube linter (diff)
downloadferdium-app-b631f0f664dc85c81032b02eebdd8eb1e8796a81.tar.gz
ferdium-app-b631f0f664dc85c81032b02eebdd8eb1e8796a81.tar.zst
ferdium-app-b631f0f664dc85c81032b02eebdd8eb1e8796a81.zip
Allow the 10th service to also be accessible via keyboard shortcut combo
Diffstat (limited to 'test')
-rw-r--r--test/jsUtils.test.ts22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/jsUtils.test.ts b/test/jsUtils.test.ts
index 7245d9a68..411ef28f9 100644
--- a/test/jsUtils.test.ts
+++ b/test/jsUtils.test.ts
@@ -127,4 +127,26 @@ describe('jsUtils', () => {
127 expect(jsUtils.safeParseInt(47.45)).toEqual(47); 127 expect(jsUtils.safeParseInt(47.45)).toEqual(47);
128 }); 128 });
129 }); 129 });
130
131 describe('acceleratorString', () => {
132 it('handles without prefix and suffix', () => {
133 expect(jsUtils.acceleratorString(5, 'abc')).toEqual('(abc+5)');
134 });
135
136 it('handles index = 0', () => {
137 expect(jsUtils.acceleratorString(0, 'abc')).toEqual('(abc+0)');
138 });
139
140 it('handles index = 1', () => {
141 expect(jsUtils.acceleratorString(1, 'abc')).toEqual('(abc+1)');
142 });
143
144 it('handles index = 10', () => {
145 expect(jsUtils.acceleratorString(10, 'abc')).toEqual('(abc+0)');
146 });
147
148 it('handles index = 11', () => {
149 expect(jsUtils.acceleratorString(11, 'abc')).toEqual(undefined);
150 });
151 });
130}); 152});