Skip to content

Commit

Permalink
updated: improve unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
GianlucaGuarini committed Jan 10, 2021
1 parent ebd35a3 commit f69fed7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"prepublishOnly": "npm run build",
"pretest": "npm run build",
"build": "rollup -c",
"test": "eslint src && IGNORE_EXIT_ERRORS=1; nyc --require esm mocha --exit test/index.js"
"test": "export RIOT_CLI_IGNORE_EXIT_ERRORS=1; eslint src && nyc --require esm mocha --exit test/index.js"
},
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions src/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export const info = compose(console.info, chalk.cyan)
export const panic = error => {
logError('A critical error occurred')

if (process.env.BUILD === 'production') {
if (process.env.RIOT_CLI_IGNORE_EXIT_ERRORS) {
throw error
} else {
trace(error)
process.exit(1)
} else {
throw error
}
}

0 comments on commit f69fed7

Please sign in to comment.