From 8950c24dc5c7580843cedd5efaf911cf2c1cd753 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 15 Feb 2016 13:51:54 -0500 Subject: [PATCH] Don't test Map and Set if they aren't defined. --- test/tests.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/tests.js b/test/tests.js index bfc4025..9a1eb63 100644 --- a/test/tests.js +++ b/test/tests.js @@ -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 }; @@ -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);