Update MD044/proper-names to parse into micromark htmlFlow tokens for better behavior when html_elements is false (fixes #832).

This commit is contained in:
David Anson 2023-05-30 20:14:02 -07:00
parent 8cb6b8eff5
commit b1eff75034
8 changed files with 386 additions and 25 deletions

View file

@ -52,6 +52,9 @@ function createTestForFile(file) {
}
}
}
for (const list of Object.values(expected)) {
list.sort();
}
const actual = {};
for (const error of errors) {
const rule = error.ruleNames[0];
@ -65,6 +68,9 @@ function createTestForFile(file) {
`Fixable rule ${rule} is not tagged as such.`
);
}
for (const list of Object.values(actual)) {
list.sort();
}
t.deepEqual(actual, expected, "Too few or too many issues found.");
// Create snapshot
const fixed = helpers.applyFixes(content, errors)