Total Complexity | 4 |
Complexity/F | 1 |
Lines of Code | 32 |
Function Count | 4 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { isString } from '../../entry'; |
||
2 | import { FunctionTester } from '../../utils'; |
||
3 | |||
4 | const tester = new FunctionTester(isString); |
||
5 | |||
6 | suite('CheckTypes: isString'); |
||
7 | |||
8 | test('Positive: isString with string input @example', function () { |
||
9 | tester.test('', true); |
||
10 | tester.test('abcd', true); |
||
11 | tester.test('34', true); |
||
12 | tester.test(new String(19), true); // eslint-disable-line no-new-wrappers |
||
13 | tester.test('multiline \n text with \ttabs', true); |
||
14 | }); |
||
15 | |||
16 | test('Negative: isString with no-string input @example', function () { |
||
17 | tester.test(13, false); |
||
18 | tester.test(true, false); |
||
19 | tester.test(new Set(), false); |
||
20 | }); |
||
21 | |||
22 | test('Negative: isString with empty input @example', function () { |
||
23 | tester.test(null, false); |
||
24 | tester.test(undefined, false); |
||
25 | tester.test(0, false); |
||
26 | tester.test('', true); |
||
27 | tester.test(false, false); |
||
28 | }); |
||
29 | |||
30 | after(async function () { |
||
31 | // console.log('after', this); |
||
32 | }); |
||
33 | |||
34 |