Skip to content

Commit

Permalink
fix unit tests for adding error message. eliminate space
Browse files Browse the repository at this point in the history
  • Loading branch information
david-gang committed Feb 15, 2015
1 parent b477896 commit ca7c639
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cli.js
Expand Up @@ -540,7 +540,7 @@ var exports = {

return config;
} catch (err) {
cli.error("Can't parse config file: " + fp + "\n Error:" + err);
cli.error("Can't parse config file: " + fp + "\nError:" + err);
exports.exit(1);
}
},
Expand Down
4 changes: 3 additions & 1 deletion tests/cli.js
Expand Up @@ -115,8 +115,10 @@ exports.group = {
]);
} catch (err) {
var msg = out.args[1][0];
console.log(msg);
test.equal(msg.slice(0, 24), "Can't parse config file:");
test.equal(msg.slice(msg.length - 10), "file1.json");
test.equal(msg.slice(25, 35), "file1.json");
test.equal(msg.slice(msg.length - 37), "Error:SyntaxError: Unexpected token w");
test.equal(err, "ProcessExit");
}

Expand Down

0 comments on commit ca7c639

Please sign in to comment.