Comparing version 0.5.1 to 0.5.2
@@ -1,3 +0,9 @@ | ||
## master | ||
## 0.5.2 | ||
* Fixed a bug with syntax errors in test files (#487). | ||
* Fixed chmod error for preprocess-cache (#491). | ||
* Support for the upcoming node 4.0 release (#490, #489). | ||
## 0.5.1 | ||
* Upgraded node-worker-pool to 3.0.0, use the native `Promise` implementation. | ||
@@ -4,0 +10,0 @@ * `testURL` can be used to set the location of the jsdom environment. |
{ | ||
"name": "jest-cli", | ||
"description": "Painless JavaScript Unit Testing.", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"main": "src/jest.js", | ||
"dependencies": { | ||
"coffee-script": "jashkenas/coffeescript", | ||
"coffee-script": "^1.10.0", | ||
"cover": "^0.2.9", | ||
@@ -9,0 +9,0 @@ "diff": "^2.1.0", |
@@ -467,3 +467,3 @@ /** | ||
default: | ||
throw new Error('Unexepcted timer type: ' + timer.type); | ||
throw new Error('Unexpected timer type: ' + timer.type); | ||
} | ||
@@ -470,0 +470,0 @@ }; |
@@ -156,8 +156,18 @@ /** | ||
// Preserve `name` property of mocked function. | ||
var boundFunctionPrefix = 'bound '; | ||
var functionName = metadata.name; | ||
var isBound = functionName && | ||
functionName.startsWith(boundFunctionPrefix); | ||
var bindCall = ''; | ||
if (isBound) { | ||
functionName = functionName.substring(boundFunctionPrefix.length); | ||
// Call bind() just to alter the function name. | ||
bindCall = '.bind(null)'; | ||
} | ||
/* jshint evil:true */ | ||
var f = new Function( | ||
'mockConstructor', | ||
'return function ' + metadata.name + '(){' + | ||
'return function ' + functionName + '(){' + | ||
'return mockConstructor.apply(this,arguments);' + | ||
'}' | ||
'}' + bindCall | ||
)(mockConstructor); | ||
@@ -164,0 +174,0 @@ |
@@ -402,12 +402,7 @@ /** | ||
try { | ||
if (!fs.existsSync(cacheDir)) { | ||
fs.mkdirSync(cacheDir); | ||
} catch(e) { | ||
if (e.code !== 'EEXIST') { | ||
throw e; | ||
} | ||
fs.chmodSync(cacheDir, '777'); | ||
} | ||
fs.chmodSync(cacheDir, '777'); | ||
var cacheKey; | ||
@@ -414,0 +409,0 @@ // If preprocessor defines custom cache hashing and |
@@ -329,2 +329,5 @@ /** | ||
env.testFilePath = testFilePath; | ||
var dispose = function() { | ||
env.dispose(); | ||
}; | ||
@@ -388,6 +391,9 @@ return this._constructModuleLoader(env, config).then(function(moduleLoader) { | ||
}).then(function(results) { | ||
env.dispose(); | ||
return results; | ||
}, function() { | ||
env.dispose(); | ||
return Promise.resolve(dispose).then(function() { | ||
return results; | ||
}); | ||
}, function(err) { | ||
return Promise.resolve(dispose).then(function() { | ||
throw err; | ||
}); | ||
}); | ||
@@ -394,0 +400,0 @@ }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
352062
9166
0
1
+ Addedcoffee-script@1.12.7(transitive)
Updatedcoffee-script@^1.10.0