Parallelize TypeScript declaration tests.

This commit is contained in:
David Anson 2025-01-03 23:13:08 -08:00
parent 4d4aab6bd4
commit 8dbfe965e9
4 changed files with 5 additions and 4 deletions

View file

@ -25,7 +25,7 @@ export default [
"demo/markdown-it.min.js",
"demo/markdownlint-browser.js",
"demo/markdownlint-browser.min.js",
"example/typescript/type-check.js",
"example/typescript/type-check-*",
"test-repos/**"
]
},

View file

@ -1 +1 @@
type-check.js
type-check-*

View file

@ -7,7 +7,6 @@ import { lint as lintPromise, readConfig as readConfigPromise } from "../../lib/
import { lint as lintSync, readConfig as readConfigSync } from "../../lib/exports-sync.mjs";
import assert from "assert";
// @ts-expect-error TS7016: Could not find a declaration file for module 'markdown-it-sub'.
import markdownItSub from "markdown-it-sub";
const markdownlintJsonPath = "../../.markdownlint.json";

View file

@ -61,7 +61,9 @@
"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-fixes.mjs test/markdownlint-test-helpers.mjs test/markdownlint-test-micromark.mjs test/markdownlint-test-result-object.mjs test/markdownlint-test-scenarios.mjs test/resolve-module-test.mjs helpers/test.cjs",
"test-cover": "c8 --100 npm test",
"test-declaration": "cd example/typescript && tsc --module commonjs && tsc --module nodenext && node type-check.js",
"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-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",
"update-snapshots": "ava --update-snapshots test/markdownlint-test-custom-rules.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",