diff options
author | Johannes Ewald <johannes.ewald@peerigon.com> | 2017-11-11 05:24:37 +0300 |
---|---|---|
committer | Johannes Ewald <johannes.ewald@peerigon.com> | 2017-11-11 05:24:37 +0300 |
commit | 9cd5ea14063d56e883ca8ba34a9b498ff480d66a (patch) | |
tree | c5ab1ddf226f92bbe27c044942dfd5f78e89277c /test | |
parent | 457955afab6e3f9baf649b6d9275d08f27b671ac (diff) |
Remove legacy code for node < 4
Diffstat (limited to 'test')
-rw-r--r-- | test/getImportGlobalsSrc.test.js | 14 |
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);
|