| Total Complexity | 5 |
| Complexity/F | 1 |
| Lines of Code | 19 |
| 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 | const c = ['Luke', 'Paul', 'John']; |
||
| 6 | |||
| 7 | describe('Intersect', () => { |
||
| 8 | describe('One side', () => { |
||
| 9 | it('Should return the intersect, in this example should it be Peter and Luke.', () => { |
||
| 10 | expect(['Peter', 'Luke']).toEqual(a.intersect(b)); |
||
| 11 | }); |
||
| 12 | }); |
||
| 13 | |||
| 14 | describe('Average both sides', () => { |
||
| 15 | it('Should return the intersect of more than 2 arrays, in this example should it be Luke.', () => { |
||
| 16 | expect(['Luke']).toEqual(a.intersect([b, c], true)); |
||
| 17 | }); |
||
| 18 | }); |
||
| 19 | }); |
||
| 20 |