Passed
Push — master ( 86ced5...e9c0b0 )
by Dmytro
01:49
created

tests/helpers/object/isEmpty.test.js   A

Complexity

Total Complexity 4
Complexity/F 1

Size

Lines of Code 30
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 19
mnd 0
bc 0
fnc 4
dl 0
loc 30
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 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