Skip to content

Commit 3adf072

Browse files
committed
test: add test for objectToMap util
1 parent 09bf8f5 commit 3adf072

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/objectToMap.unittest.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* globals describe it */
2+
3+
require("should");
4+
5+
var objectToMap = require("../lib/util/objectToMap");
6+
7+
describe("objectToMap", function() {
8+
it("should convert a plain object into a Map successfully", function() {
9+
const map = objectToMap({
10+
foo: "bar",
11+
bar: "baz"
12+
});
13+
14+
map.get("foo").should.eql("bar");
15+
map.get("bar").should.eql("baz");
16+
});
17+
});

0 commit comments

Comments
 (0)