diff options
author | Johannes <mail@johannesewald.de> | 2012-06-15 17:48:01 +0400 |
---|---|---|
committer | Johannes <mail@johannesewald.de> | 2012-06-15 17:48:01 +0400 |
commit | 512548d888a8a34c3acf8b4c485579596812e506 (patch) | |
tree | 98cfacbdd7d85cb542f3912ea88ec26f6d89f6e2 /test/__set__.test.js | |
parent | d936fe1491409573a28cc3a981fc110f08bf6a4c (diff) |
namespaced all variables within the __set__ method so you can really set all variables
Diffstat (limited to 'test/__set__.test.js')
-rw-r--r-- | test/__set__.test.js | 12 |
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__();
|