Skip to content

Commit 8728a9b

Browse files
committed
perf: increase test concurrency and add coverage to pre-commit hook
Add --test-concurrency=32 to all test scripts so timer-bound tests run more files in parallel. Add pnpm test:coverage to the pre-commit hook so the coverage gate is enforced locally before every commit.
1 parent 0ca915b commit 8728a9b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pnpm run typecheck && pnpm run lint && pnpm run format:check && pnpm run build
1+
pnpm run typecheck && pnpm run lint && pnpm run format:check && pnpm run build && cd packages/agent && pnpm run test:coverage

packages/agent/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
"lint:fix": "eslint . --fix",
3939
"format": "prettier --write .",
4040
"format:check": "prettier --check .",
41-
"test": "node --test --experimental-strip-types tests/**/*.test.ts tests/*.test.ts",
42-
"test:watch": "node --test --experimental-strip-types --watch tests/**/*.test.ts tests/*.test.ts",
43-
"test:coverage": "node --test --experimental-test-coverage --test-coverage-lines=95 --test-coverage-functions=90 --test-coverage-branches=90 --experimental-strip-types tests/**/*.test.ts tests/*.test.ts",
41+
"test": "node --test --test-concurrency=32 --experimental-strip-types tests/**/*.test.ts tests/*.test.ts",
42+
"test:watch": "node --test --test-concurrency=32 --experimental-strip-types --watch tests/**/*.test.ts tests/*.test.ts",
43+
"test:coverage": "node --test --test-concurrency=32 --experimental-test-coverage --test-coverage-lines=95 --test-coverage-functions=90 --test-coverage-branches=90 --experimental-strip-types tests/**/*.test.ts tests/*.test.ts",
4444
"validate": "pnpm run typecheck && pnpm run lint && pnpm run format:check && pnpm run test:coverage",
4545
"prepublishOnly": "node -e \"require('fs').copyFileSync('../../README.md','./README.md')\" && pnpm run build",
4646
"postpublish": "node -e \"require('fs').unlinkSync('./README.md')\""

0 commit comments

Comments
 (0)