Test Failed
Push — master ( db6889...9321a0 )
by Dmytro
01:41
created

tests/rules/required.test.js   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 16
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 10
mnd 0
bc 0
fnc 2
dl 0
loc 16
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
rs 10
1
import { RuleTester } from '../utils';
2
3
const tester = new RuleTester('required');
4
5
suite('Rules: required');
6
7
test('Positive: numbers', function () {
8
    tester.positive(1, 1);
9
    tester.positive(Number.NaN, Number.NaN);
10
    tester.positive(0, 0);
11
});
12
13
test('Negative: REQUIRED', function () {
14
    tester.negative(undefined, 'REQUIRED', 'The value is required');
15
    tester.negative(null, 'REQUIRED', 'The value is required');
16
});
17