mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06: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
|
|
@ -1158,7 +1158,7 @@ test("customRulesLintJavaScript", (t) => new Promise((resolve) => {
|
|||
}));
|
||||
|
||||
test("customRulesValidateJson", (t) => new Promise((resolve) => {
|
||||
t.plan(2);
|
||||
t.plan(3);
|
||||
const options = {
|
||||
"customRules": customRules.validateJson,
|
||||
"files": "test/validate-json.md"
|
||||
|
|
@ -1172,13 +1172,18 @@ test("customRulesValidateJson", (t) => new Promise((resolve) => {
|
|||
"ruleNames": [ "validate-json" ],
|
||||
"ruleDescription": "Rule that validates JSON code",
|
||||
"ruleInformation": null,
|
||||
"errorDetail": "Unexpected end of JSON input",
|
||||
"errorContext": null,
|
||||
"errorRange": null,
|
||||
"fixInfo": null
|
||||
}
|
||||
]
|
||||
};
|
||||
t.true(
|
||||
actual && (actual["test/validate-json.md"][0].errorDetail.length > 0),
|
||||
"Missing errorDetail"
|
||||
);
|
||||
// @ts-ignore
|
||||
delete actual["test/validate-json.md"][0].errorDetail;
|
||||
t.deepEqual(actual, expected, "Unexpected issues.");
|
||||
resolve();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue