Completed
Push — master ( 734acd...e65e46 )
by Pieter Epeüs
13s queued 10s
created

test/diff.js   A

Complexity

Total Complexity 5
Complexity/F 1

Size

Lines of Code 20
Function Count 5

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 11
mnd 0
bc 0
fnc 5
dl 0
loc 20
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 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