Passed
Push — es2015 ( 64e5b0...a07c6e )
by Luís
01:47
created

Config.test.js ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 1
rs 10
c 2
b 0
f 0
1
jest.autoMockOff();
0 ignored issues
show
Bug introduced by
The variable jest seems to be never declared. If this is a global, consider adding a /** global: jest */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
2
3
import Config from "../Config";
4
5
const equals = (actual, expected) => expect(actual).toBe(expected);
6
const instance = new Config();
7
8
test("Test Config", () => {
9
    equals(instance.get("foo"), null);
10
    equals(instance.get("foo", "x"), "x");
11
    
12
    instance.set("foo", 10);
13
    equals(instance.get("foo"), 10);
14
    equals(instance.get("foo", "x"), 10);
15
});