From ad7056daa37b376bdddd990ad117fdd271dbda8d Mon Sep 17 00:00:00 2001 From: Nick Bottomley Date: Fri, 24 Oct 2014 17:16:54 -0700 Subject: rewire methods as non-enumerable --- test/testModules/sharedTestCases.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') diff --git a/test/testModules/sharedTestCases.js b/test/testModules/sharedTestCases.js index 1ba1fae..9e667e3 100644 --- a/test/testModules/sharedTestCases.js +++ b/test/testModules/sharedTestCases.js @@ -66,6 +66,18 @@ describe("rewire " + (typeof testEnv === "undefined"? "(node)": "(" + testEnv + expect(rewire("./moduleB.js").__with__.toString()).to.be(__with__Src); }); + it("should provide __set__ as a non-enumerable property", function () { + expect(Object.keys(rewire("./moduleA.js")).indexOf("__set__")).to.be(-1) + }); + + it("should provide __get__ as a non-enumerable property", function () { + expect(Object.keys(rewire("./moduleA.js")).indexOf("__get__")).to.be(-1) + }); + + it("should provide __with__ as a non-enumerable property", function () { + expect(Object.keys(rewire("./moduleA.js")).indexOf("__with__")).to.be(-1) + }); + it("should not influence other modules", function () { rewire("./moduleA.js"); -- cgit v1.2.3