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/getImportGlobalsSrc.test.js')
-rw-r--r--test/getImportGlobalsSrc.test.js14
1 files changed, 2 insertions, 12 deletions
diff --git a/test/getImportGlobalsSrc.test.js b/test/getImportGlobalsSrc.test.js
index 28ac50c..0c40e5a 100644
--- a/test/getImportGlobalsSrc.test.js
+++ b/test/getImportGlobalsSrc.test.js
@@ -31,12 +31,7 @@ describe("getImportGlobalsSrc", function () {
expectedGlobals = Object.keys(global);
vm.runInNewContext(src, context);
- actualGlobals = Object.keys(context).filter(function (key) {
- // node v0.10 does not set a constructor property on the context
- // node v0.11 does set a constructor property
- // so just lets filter it, because it doesn't make sense to mock it anyway
- return key !== "constructor";
- });
+ actualGlobals = Object.keys(context);
actualGlobals.sort();
expectedGlobals.sort();
expect(actualGlobals).to.eql(expectedGlobals);
@@ -57,12 +52,7 @@ describe("getImportGlobalsSrc", function () {
return ignore.indexOf(value) === -1;
});
vm.runInNewContext(src, context);
- actualGlobals = Object.keys(context).filter(function (key) {
- // node v0.10 does not set a constructor property on the context
- // node v0.11 does set a constructor property
- // so just lets filter it, because it doesn't make sense to mock it anyway
- return key !== "constructor"
- });
+ actualGlobals = Object.keys(context);
actualGlobals.sort();
expectedGlobals.sort();
expect(actualGlobals).to.eql(expectedGlobals);