This commit is contained in:
David Anson 2025-09-20 22:19:47 -07:00
parent 996c0f6b27
commit b3564ea841
12 changed files with 1606 additions and 64 deletions

View file

@ -226,6 +226,16 @@ const configTestExpected3511 = {
"MD041 1 error"
]
};
const configTestExpected3511warning = {
"./test/atx_heading_spacing.md": [
"MD019 3 warning",
"MD019 5 warning",
"MD041 1 warning"
],
"./test/first_heading_bad_atx.md": [
"MD041 1 warning"
]
};
const configTestExpected13511 = {
"./test/atx_heading_spacing.md": [
"MD018 1 error",
@ -237,6 +247,17 @@ const configTestExpected13511 = {
"MD041 1 error"
]
};
const configTestExpected13511warning = {
"./test/atx_heading_spacing.md": [
"MD018 1 warning",
"MD019 3 warning",
"MD019 5 warning",
"MD041 1 warning"
],
"./test/first_heading_bad_atx.md": [
"MD041 1 warning"
]
};
test("defaultUnset", getConfigTestImplementation(
{},
@ -273,7 +294,7 @@ test("defaultError", getConfigTestImplementation(
test("defaultWarning", getConfigTestImplementation(
// @ts-ignore
{ "default": "warning" },
configTestExpected13511
configTestExpected13511warning
));
test("defaultOff", getConfigTestImplementation(
@ -437,7 +458,7 @@ test("enableRulesObjectWarning", getConfigTestImplementation(
"severity": "warning"
}
},
configTestExpected3511
configTestExpected3511warning
));
test("enableRulesObjectOff", getConfigTestImplementation(
@ -1020,7 +1041,7 @@ test("readme", async(t) => {
});
test("validateJsonUsingConfigSchemaStrict", async(t) => {
t.plan(212);
t.plan(214);
// @ts-ignore
const ajv = new Ajv(ajvOptions);
const validateSchemaStrict = ajv.compile(configSchemaStrict);