-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
61 lines (46 loc) · 1.13 KB
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env node
'use strict';
/*
test of jscomplex
@author Jan Sanchez
*/
import test from 'ava';
const Complex = require('./lib/jscomplex');
const complex = new Complex(null, {maintainability: 200});
complex.process();
test('Options: format', t => {
t.same(complex.options.json, false);
});
test('Options: logicalor', t => {
t.true(complex.options.logicalor);
});
test('Options: switchcase', t => {
t.true(complex.options.switchcase);
});
test('Options: forin', t => {
t.false(complex.options.forin);
});
test('Options: trycatch', t => {
t.false(complex.options.trycatch);
});
test('Options: newmi', t => {
t.false(complex.options.newmi);
});
test('Options: newmi', t => {
t.false(complex.options.newmi);
});
test('Options: ignoreErrors', t => {
t.false(complex.options.ignoreErrors);
});
test('Options: noCoreSize', t => {
t.false(complex.options.noCoreSize);
});
test('Options: maintainability is equal to 200', t => {
t.same(complex.options.maintainability, 200);
});
test('Path is Array', t => {
t.true(Array.isArray(complex.path));
});
test('Path[0] is equal to "./**/*.js"', t => {
t.same(complex.path[0], './**/*.js');
});