Passed
Push — master ( 399330...be50ef )
by Zhenyu
01:05
created

src/__tests__/utils.js   A

Complexity

Total Complexity 4
Complexity/F 1

Size

Lines of Code 17
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 0
wmc 4
c 0
b 0
f 0
nc 1
mnd 0
bc 4
fnc 4
dl 0
loc 17
rs 10
bpm 1
cpm 1
noi 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A utils.js ➔ ??? 0 15 1
1
import { fieldStringToArray } from '../utils';
2
3
describe('fieldStringToArray', () => {
4
	describe('output emtpy array if the input is', () => {
5
		it('emtpy string', () => {
6
			const fieldString = '';
7
			const result = fieldStringToArray(fieldString);
8
			expect(result).toEqual([]);
9
		});
10
11
		it('undefined', () => {
12
			const fieldString = undefined;
0 ignored issues
show
Unused Code Comprehensibility introduced by
The assignment of undefined is not necessary as fieldString is implicitly marked as undefined by the declaration.
Loading history...
13
			const result = fieldStringToArray(fieldString);
14
			expect(result).toEqual([]);
15
		});
16
	});
17
});
18