jest-environment-node
Advanced tools
Comparing version
@@ -30,2 +30,3 @@ /** | ||
vm.createContext(this.global); | ||
global.global = global; | ||
global.clearInterval = clearInterval; | ||
@@ -40,28 +41,28 @@ global.clearTimeout = clearTimeout; | ||
installCommonGlobals(global, config.globals); | ||
this.fakeTimers = new FakeTimers(global);} | ||
this.fakeTimers = new FakeTimers(global); | ||
} | ||
dispose() { | ||
if (this.fakeTimers) { | ||
this.fakeTimers.dispose();} | ||
this.fakeTimers.dispose(); | ||
} | ||
this.global = null; | ||
this.fakeTimers = null;} | ||
this.fakeTimers = null; | ||
} | ||
runScript(script) { | ||
if (this.global) { | ||
return script.runInContext(this.global);} | ||
return script.runInContext(this.global); | ||
} | ||
return null; | ||
} | ||
return null;} | ||
runWithRealTimers(callback) { | ||
if (this.global && this.fakeTimers) { | ||
this.fakeTimers.runWithRealTimers(callback);}}} | ||
this.fakeTimers.runWithRealTimers(callback); | ||
} | ||
}} | ||
module.exports = NodeEnvironment; |
{ | ||
"name": "jest-environment-node", | ||
"version": "14.0.0", | ||
"version": "14.2.0-alpha.ca8bfb6e", | ||
"repository": { | ||
@@ -11,9 +11,4 @@ "type": "git", | ||
"dependencies": { | ||
"jest-util": "^14.0.0" | ||
"jest-util": "^14.2.0-alpha.ca8bfb6e" | ||
}, | ||
"jest": { | ||
"rootDir": "./src", | ||
"scriptPreprocessor": "../../babel-jest", | ||
"testEnvironment": "node" | ||
}, | ||
"scripts": { | ||
@@ -20,0 +15,0 @@ "test": "../../packages/jest-cli/bin/jest.js" |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
48
20%1866
-2.05%2
100%+ Added
+ Added
- Removed
- Removed