Skip to content

Commit

Permalink
Try normalizing test output for platform
Browse files Browse the repository at this point in the history
  • Loading branch information
devinivy committed Dec 2, 2019
1 parent e439c50 commit 023d323
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -10,8 +10,8 @@
"hpal": "./bin/hpal"
},
"scripts": {
"test": "lab -a @hapi/code -t 100 -L test/index.js",
"coveralls": "lab -r lcov test/index.js | coveralls"
"test": "lab -a @hapi/code -t 100 -L test/index.js test/print.js",
"coveralls": "lab -r lcov test/index.js test/print.js | coveralls"
},
"repository": {
"type": "git",
Expand Down
5 changes: 4 additions & 1 deletion test/run-util.js
Expand Up @@ -83,7 +83,10 @@ exports.cli = (argv, cwd, colors) => {
}
catch (err) {

output = output.trim(); // Ignore leading and trailing whitespace for testing purposes
// Ignore leading and trailing whitespace for testing purposes.
// Also switch \ for /, to handle OS-specific differences in paths.

output = output.replace(/\\/g, '/').trim();

if (!(err instanceof DisplayError)) {
err.output = output;
Expand Down

0 comments on commit 023d323

Please sign in to comment.