Skip to content

Commit

Permalink
Don't test Map and Set if they aren't defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn committed Feb 15, 2016
1 parent 1513a69 commit 8950c24
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ describe("encoding and decoding", function () {
assert.strictEqual(bb[0].toString("utf8"), "asdf");
});

typeof Map === "function" &&
it("should work with Map objects", function () {
var m1 = new Map;
var value = { foo: 42 };
Expand All @@ -73,6 +74,7 @@ describe("encoding and decoding", function () {
assert.strictEqual(m2.get(m2), "self");
});

typeof Map === "function" &&
it("should work with Set objects", function () {
var s1 = new Set;
s1.add(s1);
Expand Down

0 comments on commit 8950c24

Please sign in to comment.