Update project file linting test to include README.md, address new issues, remove extra test.

This commit is contained in:
David Anson 2022-12-13 17:11:43 -08:00
parent c9f7a323cc
commit d7433af4d3
4 changed files with 212 additions and 230 deletions

View file

@ -75,36 +75,16 @@ test("simplePromise", (t) => {
});
});
test("projectFilesNoInlineConfig", (t) => new Promise((resolve) => {
t.plan(2);
const options = {
"files": [
"CONTRIBUTING.md",
"doc/CustomRules.md",
"doc/Prettier.md",
"helpers/README.md"
],
"config": require("../.markdownlint.json"),
"customRules": [ require("markdownlint-rule-github-internal-links") ],
"noInlineConfig": true
};
markdownlint(options, function callback(err, actual) {
t.falsy(err);
const expected = {
"CONTRIBUTING.md": [],
"doc/CustomRules.md": [],
"doc/Prettier.md": [],
"helpers/README.md": []
};
t.deepEqual(actual, expected, "Issue(s) with project files.");
resolve();
});
}));
test("projectFilesInlineConfig", (t) => new Promise((resolve) => {
test("projectFiles", (t) => new Promise((resolve) => {
t.plan(2);
import("globby")
.then((module) => module.globby("doc/*.md"))
.then((files) => [
...files,
"CONTRIBUTING.md",
"README.md",
"helpers/README.md"
])
.then((files) => {
const options = {
files,