Refactor tests to split large repo tests into separate files so ava will run them in parallel (reduces test time by ~50%).

This commit is contained in:
David Anson 2023-12-30 19:14:31 -08:00
parent 7d2248d211
commit d0a491d74b
12 changed files with 597 additions and 623 deletions

View file

@ -50,7 +50,7 @@
"docker-npm-run-upgrade": "docker run --rm --tty --name npm-run-upgrade --volume $PWD:/home/workdir --workdir /home/workdir --user node node:latest npm run upgrade",
"install-micromark": "cd micromark && npm install --no-package-lock",
"lint": "eslint --ext .js,.cjs,.mjs --max-warnings 0 .",
"lint-test-repos": "ava --timeout=10m test/markdownlint-test-repos.js",
"lint-test-repos": "ava --timeout=10m test/markdownlint-test-repos-*.js",
"serial-config-docs": "npm run build-config && npm run build-docs",
"serial-declaration-demo": "npm run build-declaration && npm-run-all --continue-on-error --parallel build-demo test-declaration",
"test": "ava --timeout=30s test/markdownlint-test.js test/markdownlint-test-config.js test/markdownlint-test-custom-rules.js test/markdownlint-test-helpers.js test/markdownlint-test-micromark.mjs test/markdownlint-test-result-object.js test/markdownlint-test-scenarios.js",
@ -58,7 +58,7 @@
"test-declaration": "cd example/typescript && tsc && node type-check.js",
"test-extra": "ava --timeout=5m test/markdownlint-test-extra-parse.js test/markdownlint-test-extra-type.js",
"update-snapshots": "ava --update-snapshots test/markdownlint-test-micromark.mjs test/markdownlint-test-scenarios.js",
"update-snapshots-test-repos": "ava --timeout=10m --update-snapshots test/markdownlint-test-repos.js",
"update-snapshots-test-repos": "ava --timeout=10m --update-snapshots test/markdownlint-test-repos-*.js",
"upgrade": "npx --yes npm-check-updates --upgrade"
},
"engines": {