mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Update error message validation to handle CRLF and LF-only.
This commit is contained in:
parent
11b19f141c
commit
2b4ecdced8
1 changed files with 2 additions and 2 deletions
|
@ -1530,7 +1530,7 @@ module.exports.configBadJsonSync = function configBadJsonSync(test) {
|
|||
}, function testError(err) {
|
||||
test.ok(err, "Did not get an error for bad JSON.");
|
||||
test.ok(err instanceof Error, "Error not instance of Error.");
|
||||
test.equal(err.message, "Unexpected token b in JSON at position 5",
|
||||
test.ok(err.message.match(/Unexpected token b in JSON at position \d+/),
|
||||
"Error message unexpected.");
|
||||
return true;
|
||||
}, "Did not get exception for bad JSON.");
|
||||
|
@ -1544,7 +1544,7 @@ module.exports.configBadChildJsonSync = function configBadChildJsonSync(test) {
|
|||
}, function testError(err) {
|
||||
test.ok(err, "Did not get an error for bad child JSON.");
|
||||
test.ok(err instanceof Error, "Error not instance of Error.");
|
||||
test.equal(err.message, "Unexpected token b in JSON at position 5",
|
||||
test.ok(err.message.match(/Unexpected token b in JSON at position \d+/),
|
||||
"Error message unexpected.");
|
||||
return true;
|
||||
}, "Did not get exception for bad child JSON.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue