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

tests/helpers/array/uniqueFilter.test.js   A

Complexity

Total Complexity 3
Complexity/F 1

Size

Lines of Code 11
Function Count 3

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 7
mnd 0
bc 0
fnc 3
dl 0
loc 11
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
1
import { SnippetTesterAsync } from 'tests/utils';
2
3
suite('Arrays: uniqueFilter');
4
5
test('Positive: uniqueFilter with strict equality function @example', async function () {
6
    await SnippetTesterAsync(({ uniqueFilter }) => {
7
        const leaveUnique = uniqueFilter((a, b) => a === b);
8
9
        return [ 1, 2, 3, 3, 2, 5 ].filter(leaveUnique);
10
    }, [ 1, 2, 3, 5 ]);
11
});
12