Skip to content

Commit

Permalink
Run benchmarks on Windows using SET NODE_ENV=production && npm run be…
Browse files Browse the repository at this point in the history
…nch (Appveyor), and change the way we're making sure that always happens.
  • Loading branch information
mikermcneil committed Mar 24, 2018
1 parent 51e9485 commit d5e216a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ branches:
notifications:
email:
- [email protected]

env:
- NODE_ENV=production
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"custom-tests": "node ./node_modules/mocha/bin/mocha test/*.test.js",
"lint": "node ./node_modules/eslint/bin/eslint . --max-warnings=0 --ignore-pattern 'test/' && echo '✔ Your code looks good.'",
"bench": "NODE_ENV=production node ./node_modules/mocha/bin/mocha test/*.benchmark.js",
"bench": "node ./node_modules/mocha/bin/mocha test/*.benchmark.js",
"test": "npm run lint && npm run custom-tests && npm run bench"
},
"repository": {
Expand Down
3 changes: 3 additions & 0 deletions test/baseline.benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ var parley = require('../');
var benchSync = require('./utils/bench-sync.util');
var bench = require('./utils/bench.util');

if (process.env.NODE_ENV !== 'production') {
throw new Error('Benchmarks should be run with NODE_ENV=production!');
}


/**
Expand Down

0 comments on commit d5e216a

Please sign in to comment.