mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Merge remote-tracking branch 'origin/scenario-chunks' into next
This commit is contained in:
commit
f6e364472f
14 changed files with 61013 additions and 8 deletions
|
|
@ -58,13 +58,13 @@
|
||||||
"lint-test-repos": "ava --timeout=10m test/markdownlint-test-repos-*.mjs",
|
"lint-test-repos": "ava --timeout=10m test/markdownlint-test-repos-*.mjs",
|
||||||
"serial-config-docs": "npm run build-config && npm run build-docs",
|
"serial-config-docs": "npm run build-config && npm run build-docs",
|
||||||
"serial-declaration": "npm run build-declaration && npm run test-declaration",
|
"serial-declaration": "npm run build-declaration && npm run test-declaration",
|
||||||
"test": "ava --timeout=30s test/markdownlint-test.mjs test/markdownlint-test-config.mjs test/markdownlint-test-custom-rules.mjs test/markdownlint-test-exports.mjs test/markdownlint-test-fixes.mjs test/markdownlint-test-helpers.mjs test/markdownlint-test-micromark.mjs test/markdownlint-test-project.mjs test/markdownlint-test-result-object.mjs test/markdownlint-test-scenarios.mjs test/parse-configuration-test.mjs test/resolve-module-test.mjs helpers/test.cjs",
|
"test": "ava --timeout=30s test/markdownlint-test.mjs test/markdownlint-test-config.mjs test/markdownlint-test-custom-rules.mjs test/markdownlint-test-exports.mjs test/markdownlint-test-fixes.mjs test/markdownlint-test-helpers.mjs test/markdownlint-test-micromark.mjs test/markdownlint-test-project.mjs test/markdownlint-test-result-object.mjs test/markdownlint-test-scenarios-*.mjs test/parse-configuration-test.mjs test/resolve-module-test.mjs helpers/test.cjs",
|
||||||
"test-cover": "c8 --100 npm test",
|
"test-cover": "c8 --100 npm test",
|
||||||
"test-declaration": "npm-run-all --continue-on-error --parallel test-declaration-cts test-declaration-mts",
|
"test-declaration": "npm-run-all --continue-on-error --parallel test-declaration-cts test-declaration-mts",
|
||||||
"test-declaration-cts": "cd example/typescript && node ../../scripts/index.mjs copy type-check.ts type-check-commonjs.cts && tsc --module commonjs --esModuleInterop type-check-commonjs.cts",
|
"test-declaration-cts": "cd example/typescript && node ../../scripts/index.mjs copy type-check.ts type-check-commonjs.cts && tsc --module commonjs --esModuleInterop type-check-commonjs.cts",
|
||||||
"test-declaration-mts": "cd example/typescript && node ../../scripts/index.mjs copy type-check.ts type-check-nodenext.mts && tsc --module nodenext type-check-nodenext.mts && node type-check-nodenext.mjs",
|
"test-declaration-mts": "cd example/typescript && node ../../scripts/index.mjs copy type-check.ts type-check-nodenext.mts && tsc --module nodenext type-check-nodenext.mts && node type-check-nodenext.mjs",
|
||||||
"test-extra": "ava --timeout=10m test/markdownlint-test-extra-parse.mjs test/markdownlint-test-extra-type.mjs",
|
"test-extra": "ava --timeout=10m test/markdownlint-test-extra-parse.mjs test/markdownlint-test-extra-type.mjs",
|
||||||
"update-snapshots": "ava --update-snapshots test/markdownlint-test-custom-rules.mjs test/markdownlint-test-exports.mjs test/markdownlint-test-micromark.mjs test/markdownlint-test-scenarios.mjs",
|
"update-snapshots": "ava --update-snapshots test/markdownlint-test-custom-rules.mjs test/markdownlint-test-exports.mjs test/markdownlint-test-micromark.mjs test/markdownlint-test-scenarios-*.mjs",
|
||||||
"update-snapshots-test-repos": "ava --timeout=10m --update-snapshots test/markdownlint-test-repos-*.mjs",
|
"update-snapshots-test-repos": "ava --timeout=10m --update-snapshots test/markdownlint-test-repos-*.mjs",
|
||||||
"update-test-repos": "node scripts/index.mjs remove ./test-repos && npm run clone-test-repos && npm run update-snapshots-test-repos",
|
"update-test-repos": "node scripts/index.mjs remove ./test-repos && npm run clone-test-repos && npm run update-snapshots-test-repos",
|
||||||
"upgrade": "npx --yes npm-check-updates --upgrade"
|
"upgrade": "npx --yes npm-check-updates --upgrade"
|
||||||
|
|
|
||||||
5
test/markdownlint-test-scenarios-1.mjs
Normal file
5
test/markdownlint-test-scenarios-1.mjs
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
// @ts-check
|
||||||
|
|
||||||
|
import { createTests } from "./markdownlint-test-scenarios.mjs";
|
||||||
|
|
||||||
|
createTests(1, 4);
|
||||||
5
test/markdownlint-test-scenarios-2.mjs
Normal file
5
test/markdownlint-test-scenarios-2.mjs
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
// @ts-check
|
||||||
|
|
||||||
|
import { createTests } from "./markdownlint-test-scenarios.mjs";
|
||||||
|
|
||||||
|
createTests(2, 4);
|
||||||
5
test/markdownlint-test-scenarios-3.mjs
Normal file
5
test/markdownlint-test-scenarios-3.mjs
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
// @ts-check
|
||||||
|
|
||||||
|
import { createTests } from "./markdownlint-test-scenarios.mjs";
|
||||||
|
|
||||||
|
createTests(3, 4);
|
||||||
5
test/markdownlint-test-scenarios-4.mjs
Normal file
5
test/markdownlint-test-scenarios-4.mjs
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
// @ts-check
|
||||||
|
|
||||||
|
import { createTests } from "./markdownlint-test-scenarios.mjs";
|
||||||
|
|
||||||
|
createTests(4, 4);
|
||||||
|
|
@ -103,10 +103,18 @@ function createTestForFile(file) {
|
||||||
|
|
||||||
const dir = await fs.readdir("./test");
|
const dir = await fs.readdir("./test");
|
||||||
const files = dir.filter((file) => /\.md$/.test(file));
|
const files = dir.filter((file) => /\.md$/.test(file));
|
||||||
for (const file of files) {
|
|
||||||
// @ts-ignore
|
/**
|
||||||
test(
|
* Creates tests for chunk N/M of the set.
|
||||||
file,
|
*
|
||||||
createTestForFile(path.join("./test", file))
|
* @param {number} number Chunk number.
|
||||||
);
|
* @param {number} total Total chunks.
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
export function createTests(number, total) {
|
||||||
|
const start = Math.floor(((number - 1) * files.length) / total);
|
||||||
|
const end = Math.floor((number * files.length) / total);
|
||||||
|
for (const file of files.slice(start, end)) {
|
||||||
|
test(file, createTestForFile(path.join("./test", file)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
14003
test/snapshots/markdownlint-test-scenarios-1.mjs.md
Normal file
14003
test/snapshots/markdownlint-test-scenarios-1.mjs.md
Normal file
File diff suppressed because it is too large
Load diff
BIN
test/snapshots/markdownlint-test-scenarios-1.mjs.snap
Normal file
BIN
test/snapshots/markdownlint-test-scenarios-1.mjs.snap
Normal file
Binary file not shown.
7852
test/snapshots/markdownlint-test-scenarios-2.mjs.md
Normal file
7852
test/snapshots/markdownlint-test-scenarios-2.mjs.md
Normal file
File diff suppressed because it is too large
Load diff
BIN
test/snapshots/markdownlint-test-scenarios-2.mjs.snap
Normal file
BIN
test/snapshots/markdownlint-test-scenarios-2.mjs.snap
Normal file
Binary file not shown.
21127
test/snapshots/markdownlint-test-scenarios-3.mjs.md
Normal file
21127
test/snapshots/markdownlint-test-scenarios-3.mjs.md
Normal file
File diff suppressed because it is too large
Load diff
BIN
test/snapshots/markdownlint-test-scenarios-3.mjs.snap
Normal file
BIN
test/snapshots/markdownlint-test-scenarios-3.mjs.snap
Normal file
Binary file not shown.
17995
test/snapshots/markdownlint-test-scenarios-4.mjs.md
Normal file
17995
test/snapshots/markdownlint-test-scenarios-4.mjs.md
Normal file
File diff suppressed because it is too large
Load diff
BIN
test/snapshots/markdownlint-test-scenarios-4.mjs.snap
Normal file
BIN
test/snapshots/markdownlint-test-scenarios-4.mjs.snap
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue