Skip to content

Commit

Permalink
[[CHORE]] Add regression test for code from quit
Browse files Browse the repository at this point in the history
This functionality was introduced by "Add codes to errors generated by
quit()" [1], but no tests were included. Add a test in order to prevent
regressions.

[1] 537dcbd
  • Loading branch information
jugglinmike committed Dec 8, 2019
1 parent 58c1fc2 commit 380fe6b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/unit/core.js
Expand Up @@ -415,7 +415,9 @@ exports.argsInCatchReused = function (test) {
exports.testRawOnError = function (test) {
JSHINT(';', { maxerr: 1 });
test.equal(JSHINT.errors[0].raw, 'Unnecessary semicolon.');
test.equal(JSHINT.errors[0].code, 'W032');
test.equal(JSHINT.errors[1].raw, 'Too many errors.');
test.equal(JSHINT.errors[1].code, 'E043');
test.equal(JSHINT.errors[2], null);

test.done();
Expand Down

0 comments on commit 380fe6b

Please sign in to comment.