topics/Fizzbuzz/test.js   A
last analyzed

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 17
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 12
mnd 0
bc 0
fnc 2
dl 0
loc 17
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
1
const {
2
    fizz,
3
    buzz,
4
    fizzString,
5
    buzzString
6
} = require('./index.js');
7
// test fizz fucnction
8
test('test fizz', () => {
9
    expect(fizz(3)).toEqual(fizzString);
10
    expect(fizz(4)).toEqual('');
11
});
12
13
// test buzz fucnction
14
test('test buzz', () => {
15
    expect(buzz(3)).toEqual('');
16
    expect(buzz(5)).toEqual(buzzString);
17
});