jest-jasmine1
Advanced tools
Comparing version
@@ -10,5 +10,7 @@ /** | ||
const JasmineReporter = require('./reporter'); | ||
const fs = require('graceful-fs'); | ||
const jasminePit = require('./jasmine-pit'); | ||
const JasmineReporter = require('./reporter'); | ||
const vm = require('vm'); | ||
@@ -18,5 +20,15 @@ const JASMINE_PATH = require.resolve('../vendor/jasmine-1.3.0'); | ||
const jasmineFileContent = fs.readFileSync(JASMINE_PATH, 'utf8'); | ||
const jasmineOnlyContent = fs.readFileSync(JASMINE_ONLY_PATH, 'utf8'); | ||
const jasmineScript = new vm.Script(fs.readFileSync(JASMINE_PATH, 'utf8'), { | ||
displayErrors: true, | ||
filename: JASMINE_PATH }); | ||
const jasmineOnlyScript = new vm.Script( | ||
fs.readFileSync(JASMINE_ONLY_PATH, 'utf8'), | ||
{ | ||
displayErrors: true, | ||
filename: JASMINE_ONLY_PATH }); | ||
function isSpyLike(test) { | ||
@@ -105,5 +117,5 @@ return test.calls !== undefined;} | ||
environment.fakeTimers.runWithRealTimers(() => { | ||
environment.runSourceText(jasmineFileContent, JASMINE_PATH); | ||
environment.runScript(jasmineScript); | ||
jasminePit.install(environment.global); | ||
environment.runSourceText(jasmineOnlyContent); | ||
environment.runScript(jasmineOnlyScript); | ||
@@ -110,0 +122,0 @@ const _comparedObjects = new WeakMap(); |
{ | ||
"name": "jest-jasmine1", | ||
"version": "13.2.2", | ||
"version": "13.3.0-alpha.4eb0c908", | ||
"repository": { | ||
@@ -12,6 +12,7 @@ "type": "git", | ||
"graceful-fs": "^4.1.3", | ||
"jest-util": "^13.2.2" | ||
"jest-util": "^13.3.0-alpha.4eb0c908" | ||
}, | ||
"jest": { | ||
"rootDir": "./build", | ||
"rootDir": "./src", | ||
"scriptPreprocessor": "../../babel-jest", | ||
"testEnvironment": "node" | ||
@@ -18,0 +19,0 @@ }, |
Sorry, the diff of this file is not supported yet
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
87091
0.26%2633
0.27%2
100%1
Infinity%+ Added
+ Added
- Removed
- Removed