mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-01-14 11:58:50 +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
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 files = dir.filter((file) => /\.md$/.test(file));
|
||||
for (const file of files) {
|
||||
// @ts-ignore
|
||||
test(
|
||||
file,
|
||||
createTestForFile(path.join("./test", file))
|
||||
);
|
||||
|
||||
/**
|
||||
* Creates tests for chunk N/M of the set.
|
||||
*
|
||||
* @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