Total Complexity | 3 |
Complexity/F | 1 |
Lines of Code | 17 |
Function Count | 3 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { SnippetTesterAsync } from 'tests/utils'; |
||
2 | |||
3 | suite('Arrays: uniqueIdenticFilter'); |
||
4 | |||
5 | test('Positive: uniqueIdenticFilter for array of numbers @example', async function () { |
||
6 | await SnippetTesterAsync(({ uniqueIdenticFilter }) => { |
||
7 | const items = [ 1, 2, '4', 3, 2, 1, 4, '2', 3, 5 ]; |
||
8 | |||
9 | return items.filter(uniqueIdenticFilter); |
||
10 | }, [ 1, 2, '4', 3, 4, '2', 5 ]); |
||
11 | |||
12 | await SnippetTesterAsync(({ uniqueIdenticFilter }) => { |
||
13 | const items = [ 6, 7 ]; |
||
14 | |||
15 | return items.filter(uniqueIdenticFilter); |
||
16 | }, [ 6, 7 ]); |
||
17 | }); |
||
18 |