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
diff options
context:
space:
mode:
Diffstat (limited to 'test/__set__.test.js')
-rw-r--r--test/__set__.test.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/__set__.test.js b/test/__set__.test.js
index e7950cb..e1565c7 100644
--- a/test/__set__.test.js
+++ b/test/__set__.test.js
@@ -19,7 +19,14 @@ describe("__set__", function () {
beforeEach(function () {
moduleFake = {
myNumber: 0, // copy by value
- myObj: {} // copy by reference
+ myObj: {}, // copy by reference
+
+ // these variables are used within the set method
+ // because there is a eval() statement within the set method
+ // these variables should not override same-named vars of the module
+ key: "key",
+ env: "env",
+ src: "src"
};
vm.runInNewContext(
@@ -67,6 +74,9 @@ describe("__set__", function () {
});
}).to.throwException(expectReferenceError);
});
+ it("should not clash with vars used within the set method", function () {
+
+ });
it("should throw a TypeError when passing misfitting params", function () {
expect(function () {
moduleFake.__set__();