Total Complexity | 5 |
Complexity/F | 1 |
Lines of Code | 20 |
Function Count | 5 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { Arr } from '../src/helpers'; |
||
2 | |||
3 | const a = new Arr(['John', 'Peter', 'Luke']); |
||
4 | const b = ['Peter', 'Luke', 'Paul']; |
||
5 | |||
6 | describe('Diff', () => { |
||
7 | describe('One side', () => { |
||
8 | it('Should return the difference, in this example should it be John.', () => { |
||
9 | expect(['John'].toString()).toEqual(a.diff(b).toString()); |
||
10 | }); |
||
11 | }); |
||
12 | |||
13 | describe('Average both sides', () => { |
||
14 | it('Should return the difference of both sides, in this example should it be John and Paul.', () => { |
||
15 | expect(['John', 'Paul'].toString()).toEqual( |
||
16 | a.diff(b, true).toString() |
||
17 | ); |
||
18 | }); |
||
19 | }); |
||
20 | }); |
||
21 |