Total Complexity | 5 |
Complexity/F | 1 |
Lines of Code | 24 |
Function Count | 5 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { Arr } from '../src/helpers'; |
||
2 | |||
3 | const a = new Arr(); |
||
4 | |||
5 | const expectedResults = { |
||
6 | test1: ['John', 'Peter'], |
||
7 | test2: ['John', 'Peter', 'Luke', 'Paul'], |
||
8 | }; |
||
9 | |||
10 | describe('Push if not exists', () => { |
||
11 | describe('Test 1', () => { |
||
12 | it('Should be return 2 item in the array.', () => { |
||
13 | a.pushMultiple(['John', 'Peter']); |
||
14 | expect(expectedResults.test1).toEqual(a); |
||
15 | }); |
||
16 | }); |
||
17 | |||
18 | describe('Test 2', () => { |
||
19 | it('Should be return 4 item in the array.', () => { |
||
20 | a.pushMultiple(['Luke', 'Paul']); |
||
21 | expect(expectedResults.test2).toEqual(a); |
||
22 | }); |
||
23 | }); |
||
24 | }); |
||
25 |