mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-21 08:20:12 +01:00
Add Node 20 to CI matrix, update test cases to handle new error strings in Node 20.
This commit is contained in:
parent
2cef1d1b3f
commit
0cf81e4ef4
3 changed files with 12 additions and 7 deletions
|
|
@ -252,7 +252,7 @@ test("configBadHybrid", (t) => new Promise((resolve) => {
|
|||
t.true(err instanceof Error, "Error not instance of Error.");
|
||||
t.truthy(err.message.match(
|
||||
// eslint-disable-next-line max-len
|
||||
/^Unable to parse '[^']*'; Parser \d+: Unexpected token \S+ in JSON at position \d+;/
|
||||
/^Unable to parse '[^']*'; Parser \d+: (Unexpected token|Expected property name)/
|
||||
), "Error message unexpected.");
|
||||
t.true(!result, "Got result for bad child JSON.");
|
||||
resolve();
|
||||
|
|
@ -333,7 +333,7 @@ test("configBadJsonSync", (t) => {
|
|||
{
|
||||
"message":
|
||||
// eslint-disable-next-line max-len
|
||||
/Unable to parse '[^']*'; Parser \d+: Unexpected token \S+ in JSON at position \d+/
|
||||
/Unable to parse '[^']*'; Parser \d+: (Unexpected token|Expected property name)/
|
||||
},
|
||||
"Did not get correct exception for bad JSON."
|
||||
);
|
||||
|
|
@ -348,7 +348,7 @@ test("configBadChildJsonSync", (t) => {
|
|||
{
|
||||
"message":
|
||||
// eslint-disable-next-line max-len
|
||||
/Unable to parse '[^']*'; Parser \d+: Unexpected token \S+ in JSON at position \d+/
|
||||
/Unable to parse '[^']*'; Parser \d+: (Unexpected token|Expected property name)/
|
||||
},
|
||||
"Did not get correct exception for bad child JSON."
|
||||
);
|
||||
|
|
@ -442,7 +442,7 @@ test("configBadHybridSync", (t) => {
|
|||
},
|
||||
{
|
||||
// eslint-disable-next-line max-len
|
||||
"message": /^Unable to parse '[^']*'; Parser \d+: Unexpected token \S+ in JSON at position \d+;/
|
||||
"message": /^Unable to parse '[^']*'; Parser \d+: (Unexpected token|Expected property name)/
|
||||
},
|
||||
"Did not get correct exception for bad content."
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue