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

test/pushMultiple.js   A

Complexity

Total Complexity 5
Complexity/F 1

Size

Lines of Code 24
Function Count 5

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 14
mnd 0
bc 0
fnc 5
dl 0
loc 24
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();
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