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.8 to 0.5.10

.haste_cache/cache-_Users_poshannessy_FB_code_jest_examples_tutorial

18

bin/jest.js

@@ -134,2 +134,8 @@ #!/usr/bin/env node

},
watchExtensions: {
description: _wrapDesc(
'Comma separated list of file extensions to watch, defaults to js.'
),
type: 'string'
},
bail: {

@@ -159,2 +165,8 @@ alias: 'b',

if (argv.watchExtensions && argv.watch === undefined) {
throw (
'--watchExtensions can only be specified together with --watch.'
);
}
if (argv.testEnvData) {

@@ -261,4 +273,8 @@ argv.testEnvData = JSON.parse(argv.testEnvData);

var useWatchman = !err && resolvedPath;
var watchExtensions = argv.watchExtensions || 'js';
var globs = watchExtensions.split(',').map(function(extension) {
return '**/*' + extension;
});
var watcher = sane(cwdPackageRoot, {
glob: ['**/*.js'],
glob: globs,
watchman: useWatchman

@@ -265,0 +281,0 @@ });

8

package.json
{
"name": "jest-cli",
"description": "Painless JavaScript Unit Testing.",
"version": "0.5.8",
"version": "0.5.10",
"main": "src/jest.js",

@@ -14,4 +14,6 @@ "dependencies": {

"jasmine-pit": "^2.0.2",
"jsdom": "6.5.0",
"jsdom": "6.5.1",
"json-stable-stringify": "^1.0.0",
"lodash.template": "^3.6.2",
"mkdirp": "^0.5.1",
"node-haste": "^1.2.8",

@@ -22,4 +24,4 @@ "node-worker-pool": "^3.0.2",

"resolve": "^1.1.6",
"sane": "^1.2.0",
"through": "^2.3.8",
"sane": "^1.2.0",
"which": "^1.1.1"

@@ -26,0 +28,0 @@ },

@@ -20,2 +20,3 @@ /**

var hasteLoaders = require('node-haste/lib/loaders');
var mkdirp = require('mkdirp');
var moduleMocker = require('../lib/moduleMocker');

@@ -87,10 +88,12 @@ var NodeHaste = require('node-haste/lib/Haste');

var HASTE_IGNORE_REGEX = new RegExp(
config.modulePathIgnorePatterns.length > 0
? config.modulePathIgnorePatterns.join('|')
: '$.' // never matches
[config.cacheDirectory].concat(config.modulePathIgnorePatterns).join('|')
);
if (!fs.existsSync(config.cacheDirectory)) {
fs.mkdirSync(config.cacheDirectory);
fs.chmodSync(config.cacheDirectory, '777');
// Support npm package scopes that add an extra directory to the path
var scopedCacheDirectory = path.dirname(_getCacheFilePath(config));
if (!fs.existsSync(scopedCacheDirectory)) {
mkdirp.sync(scopedCacheDirectory, {
mode: '777',
fs: fs,
});
}

@@ -604,6 +607,8 @@

var realPath = fs.realpathSync(modulePath);
this._configShouldMockModuleNames[moduleName] = true;
for (var i = 0; i < this._unmockListRegExps.length; i++) {
unmockRegExp = this._unmockListRegExps[i];
if (unmockRegExp.test(modulePath)) {
if (unmockRegExp.test(modulePath) ||
unmockRegExp.test(realPath)) {
return this._configShouldMockModuleNames[moduleName] = false;

@@ -620,5 +625,3 @@ }

Loader.prototype.constructBoundRequire = function(unresolvedModulePath) {
var modulePath = fs.realpathSync(unresolvedModulePath);
Loader.prototype.constructBoundRequire = function(modulePath) {
var boundModuleRequire =

@@ -625,0 +628,0 @@ this.requireModuleOrMock.bind(this, modulePath);

@@ -8,4 +8,3 @@ /**

*/
// This module uses the Function constructor, so it can't currently run
// in strict mode
/* jshint strict:false */

@@ -12,0 +11,0 @@

@@ -14,2 +14,3 @@ /**

var path = require('path');
var stringify = require('json-stable-stringify');

@@ -365,2 +366,5 @@ var DEFAULT_CONFIG_VALUES = {

// To avoid stringifiying the config multiple times
var configToJsonMap = new Map();
// There are two layers of caching: in memory (always enabled),

@@ -429,6 +433,12 @@ // and on disk (enabled by default, and managed by the

} else {
var configStr = configToJsonMap.get(config);
if (!configStr) {
configStr = stringify(config);
configToJsonMap.set(config, configStr);
}
// Default cache hashing.
cacheKey = crypto.createHash('md5')
.update(fileData)
.update(JSON.stringify(config))
.update(configStr)
.digest('hex');

@@ -435,0 +445,0 @@ }

@@ -525,2 +525,3 @@ /**

tests: {},
testResults: {},
logMessages: []

@@ -527,0 +528,0 @@ };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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