diff options
author | Ricardo Cino <ricardo@cino.io> | 2022-11-28 16:53:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-28 15:53:04 +0000 |
commit | d5d685aaf4e796faf612c6d0fea0f0cc9ea49614 (patch) | |
tree | 72f027dc2d57f00c366d61570fd76ed6a0fcb27a /test/jsUtils.test.ts | |
parent | 6.2.1-nightly.52 [skip ci] (diff) | |
download | ferdium-app-d5d685aaf4e796faf612c6d0fea0f0cc9ea49614.tar.gz ferdium-app-d5d685aaf4e796faf612c6d0fea0f0cc9ea49614.tar.zst ferdium-app-d5d685aaf4e796faf612c6d0fea0f0cc9ea49614.zip |
fix: ensure default values are working for the all fields in all settings screens (#750)
Co-authored-by: Vijay A <vraravam@users.noreply.github.com>
Diffstat (limited to 'test/jsUtils.test.ts')
-rw-r--r-- | test/jsUtils.test.ts | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/test/jsUtils.test.ts b/test/jsUtils.test.ts index 406326d4b..a8de4475c 100644 --- a/test/jsUtils.test.ts +++ b/test/jsUtils.test.ts | |||
@@ -1,23 +1,6 @@ | |||
1 | import * as jsUtils from '../src/jsUtils'; | 1 | import * as jsUtils from '../src/jsUtils'; |
2 | 2 | ||
3 | describe('jsUtils', () => { | 3 | describe('jsUtils', () => { |
4 | describe('ifUndefinedString', () => { | ||
5 | it('returns the default value for undefined input', () => { | ||
6 | const result = jsUtils.ifUndefinedString(undefined, 'abc'); | ||
7 | expect(result).toEqual('abc'); | ||
8 | }); | ||
9 | |||
10 | it('returns the default value for null input', () => { | ||
11 | const result = jsUtils.ifUndefinedString(null, 'abc'); | ||
12 | expect(result).toEqual('abc'); | ||
13 | }); | ||
14 | |||
15 | it('returns the non-default input value for regular string input', () => { | ||
16 | const result = jsUtils.ifUndefinedString('some random string', 'abc'); | ||
17 | expect(result).toEqual('some random string'); | ||
18 | }); | ||
19 | }); | ||
20 | |||
21 | describe('ifUndefined<string>', () => { | 4 | describe('ifUndefined<string>', () => { |
22 | it('returns the default value for undefined input', () => { | 5 | it('returns the default value for undefined input', () => { |
23 | const result = jsUtils.ifUndefined<string>(undefined, 'abc'); | 6 | const result = jsUtils.ifUndefined<string>(undefined, 'abc'); |