mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Make new test backward-compatible for testing Node versions < 22.
This commit is contained in:
parent
63147ee1eb
commit
a5e2134147
1 changed files with 5 additions and 1 deletions
|
@ -31,8 +31,12 @@ test("invalid json, default parser", (t) => {
|
|||
const actual = parseConfiguration("name", "{");
|
||||
const expected = {
|
||||
"config": null,
|
||||
"message": "Unable to parse 'name'; Parser 0: Expected property name or '}' in JSON at position 1 (line 1 column 2)"
|
||||
"message": "Unable to parse 'name'; Parser 0: Expected property name or '}' in JSON at position 1"
|
||||
};
|
||||
// Backwards-compatibility for testing Node versions < 22
|
||||
if (actual.message) {
|
||||
actual.message = actual.message.replace(" (line 1 column 2)", "");
|
||||
}
|
||||
t.deepEqual(actual, expected);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue