Skip to content

Commit

Permalink
fix: ensure that benchmark is run with ROARR_LOG=true
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Dec 24, 2020
1 parent bb7f379 commit 2928593
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -84,7 +84,7 @@
"url": "git@github.com:gajus/roarr.git"
},
"scripts": {
"benchmark": "babel-node test/benchmark.js",
"benchmark": "ROARR_LOG=true babel-node test/benchmark.js",
"build": "rm -fr ./dist && NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps && flow-copy-source src dist",
"create-readme": "gitdown ./.README/README.md --output-file ./README.md",
"dev": "NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps --watch",
Expand Down
4 changes: 3 additions & 1 deletion test/benchmark.js
Expand Up @@ -9,7 +9,9 @@ import createGlobalThis from 'globalthis';
import roarr from '../src/log';

// eslint-disable-next-line node/no-process-env
process.env.ROARR_LOG = 'true';
if (process.env.ROARR_LOG !== 'true') {
throw new Error('Must run benchmark with ROARR_LOG=true.');
}

const globalThis = createGlobalThis();

Expand Down

0 comments on commit 2928593

Please sign in to comment.