Merge remote-tracking branch 'origin/scenario-chunks' into next

This commit is contained in:
Rod 2025-09-18 07:42:51 -03:00
commit f6e364472f
14 changed files with 61013 additions and 8 deletions

View file

@ -0,0 +1,5 @@
// @ts-check
import { createTests } from "./markdownlint-test-scenarios.mjs";
createTests(1, 4);

View file

@ -0,0 +1,5 @@
// @ts-check
import { createTests } from "./markdownlint-test-scenarios.mjs";
createTests(2, 4);

View file

@ -0,0 +1,5 @@
// @ts-check
import { createTests } from "./markdownlint-test-scenarios.mjs";
createTests(3, 4);

View file

@ -0,0 +1,5 @@
// @ts-check
import { createTests } from "./markdownlint-test-scenarios.mjs";
createTests(4, 4);

View file

@ -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)));
}
}

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.