Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jest-cli

Package Overview
Dependencies
Maintainers
6
Versions
391
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-cli - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

8

CHANGELOG.md

@@ -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.

4

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc