topics/median/test.js   A
last analyzed

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 8
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 6
mnd 0
bc 0
fnc 1
dl 0
loc 8
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
1
const median = require('./index.js');
2
// put your tests here
3
test('test median', () => {
4
    expect(median([1, 2, 3, 4, 5], [6, 7, 8, 9, 10])).toEqual(5);
5
    expect(median([1, 2, 3, 8, 9], [4, 5, 6, 7, 10])).toEqual(5);
6
    expect(median([1, 12, 15, 26, 38], [2, 13, 17, 30, 45])).toEqual(16);
7
    expect(median([1, 2, 8, 9, 10], [4, 5, 8, 11, 12])).toEqual(8);
8
});