Merge pull request #5020 from sebmarkbage/fixjestcli

Enforce NODE_ENV=test
This commit is contained in:
Sebastian Markbåge
2015-09-30 17:57:52 -07:00
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -51,7 +51,7 @@
"linc": "git diff --name-only --diff-filter=ACMRTUB `git merge-base HEAD master` | grep '\\.js$' | xargs eslint --",
"lint": "grunt lint",
"postinstall": "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json",
"test": "NODE_ENV=test jest"
"test": "jest"
},
"jest": {
"modulePathIgnorePatterns": [
+4
View File
@@ -1,5 +1,9 @@
'use strict';
// React's test can only work in NODE_ENV=test because of how things
// are set up. So we might as well enforce it.
process.env.NODE_ENV = 'test';
var path = require('path');
var assign = require('object-assign');