@trenskow/equals 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/launch.json +16 -0
- package/index.js +1 -1
- package/package.json +1 -1
- package/test/index.js +14 -2
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
|
3
|
+
// Hover to view descriptions of existing attributes.
|
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
"version": "0.2.0",
|
|
6
|
+
"configurations": [
|
|
7
|
+
{
|
|
8
|
+
"type":"node",
|
|
9
|
+
"request":"launch",
|
|
10
|
+
"name":"Run tests",
|
|
11
|
+
"runtimeExecutable":"_mocha",
|
|
12
|
+
"cwd":"${workspaceFolder}",
|
|
13
|
+
"args":[]
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
package/index.js
CHANGED
package/package.json
CHANGED
package/test/index.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { expect } from 'chai';
|
|
10
10
|
|
|
11
|
-
import equals from '../
|
|
11
|
+
import equals from '../index.js';
|
|
12
12
|
|
|
13
13
|
describe('@trenskow/equals', () => {
|
|
14
14
|
|
|
@@ -50,7 +50,19 @@ describe('@trenskow/equals', () => {
|
|
|
50
50
|
expect(equals(1, '1')).to.be.false;
|
|
51
51
|
expect(equals([1, 2], { a: 1, b: 2 })).to.be.false;
|
|
52
52
|
});
|
|
53
|
-
|
|
53
|
+
|
|
54
|
+
it ('should not equal null and object.', () => {
|
|
55
|
+
expect(equals(null, {})).to.be.false;
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it ('should equal null and null.', () => {
|
|
59
|
+
expect(equals(null, null)).to.be.true;
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it ('should equal undefined and undefined.', () => {
|
|
63
|
+
expect(equals(undefined, undefined)).to.be.true;
|
|
64
|
+
});
|
|
65
|
+
|
|
54
66
|
});
|
|
55
67
|
|
|
56
68
|
});
|