Update MD006/MD023 to report fixInfo for violations, process input to fixErrors.

This commit is contained in:
David Anson 2019-09-02 15:35:43 -07:00
parent 84e972c72c
commit 5e73aa1d9d
5 changed files with 94 additions and 25 deletions

View file

@ -1898,7 +1898,7 @@ module.exports.forEachInlineCodeSpan = function forEachInlineCodeSpan(test) {
};
module.exports.fixErrors = function fixErrors(test) {
test.expect(23);
test.expect(24);
const testCases = [
[
"Hello world.",
@ -2221,6 +2221,20 @@ module.exports.fixErrors = function fixErrors(test) {
],
"Hello wld"
],
[
"Hello world",
[
{
"fixInfo": {
"lineNumber": 1,
"editColumn": 7,
"deleteCount": 1,
"insertText": "z"
}
}
],
"Hello zorld"
],
[
"Hello world",
[
@ -2239,7 +2253,7 @@ module.exports.fixErrors = function fixErrors(test) {
}
}
],
"Hello zworld"
"Hello zorld"
],
[
"Hello world",
@ -2259,7 +2273,7 @@ module.exports.fixErrors = function fixErrors(test) {
}
}
],
"Hello zworld"
"Hello zorld"
]
];
testCases.forEach((testCase) => {