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