Total Complexity | 4 |
Complexity/F | 1 |
Lines of Code | 30 |
Function Count | 4 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { isEmpty } from '../../entry'; |
||
2 | import { FunctionTester } from '../../utils'; |
||
3 | |||
4 | const tester = new FunctionTester(isEmpty); |
||
5 | |||
6 | suite('object: isEmpty'); |
||
7 | |||
8 | test('Positive: isEmpty with empty input @example', function () { |
||
9 | // tester.test([], true); |
||
10 | tester.test({}, true); |
||
11 | }); |
||
12 | |||
13 | test('Negative: isEmpty with no-array input @example', function () { |
||
14 | tester.test(13, false); |
||
15 | tester.test(true, false); |
||
16 | tester.test([ 0 ], false); |
||
17 | tester.test({ length: 0 }, false); |
||
18 | }); |
||
19 | |||
20 | test('Negative: isEmpty with empty input @example', function () { |
||
21 | tester.test(null, false); |
||
22 | tester.test(undefined, false); |
||
23 | tester.test(0, false); |
||
24 | tester.test('', false); |
||
25 | tester.test(false, false); |
||
26 | }); |
||
27 | |||
28 | after(async function () { |
||
29 | // console.log('after', this); |
||
30 | }); |
||
31 | |||
32 |