Skip to content

Commit

Permalink
Merge pull request #5020 from sebmarkbage/fixjestcli
Browse files Browse the repository at this point in the history
Enforce NODE_ENV=test
  • Loading branch information
sebmarkbage committed Oct 1, 2015
2 parents 29fbbe7 + 41cba2e commit 401e6f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
4 changes: 4 additions & 0 deletions scripts/jest/preprocessor.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down

0 comments on commit 401e6f1

Please sign in to comment.