Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/rewire.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNick Bottomley <nhbottomley@gmail.com>2014-10-25 04:16:54 +0400
committerNick Bottomley <nhbottomley@gmail.com>2014-10-25 04:16:54 +0400
commitad7056daa37b376bdddd990ad117fdd271dbda8d (patch)
tree7add27ff89122ca63ec6bcc132864b3a30cf8c23 /test
parent3e06f8784c0a08bf3dacf8eb15aff1b6902394a9 (diff)
rewire methods as non-enumerable
Diffstat (limited to 'test')
-rw-r--r--test/testModules/sharedTestCases.js12
1 files changed, 12 insertions, 0 deletions
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");