test: execute tests serially to speed up test execution (#284)

By default, `jest` runs tests in parallel. However, with the current
configuration of `ts-jest`, all workers run `tsc` in parallel, which is
very slow and consumes a lot of resources. This is what takes the
longest.
By running `jest` serially, `tsc` runs before starting the first test,
then all subsequent tests run faster. This will probably be improved by
customizing the configuration of `jest` or with future versions of
`ts-jest`.
development
Thomas Bouffard 2023-12-10 10:22:07 +01:00 committed by GitHub
parent 9463e1e21e
commit 8d6f0e107c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@
"build": "tsc --version && tsc", "build": "tsc --version && tsc",
"docs:api": "typedoc src/index.ts", "docs:api": "typedoc src/index.ts",
"prepack": "run-s clean build", "prepack": "run-s clean build",
"test": "jest" "test": "jest --runInBand"
}, },
"devDependencies": { "devDependencies": {
"jest": "^29.3.1", "jest": "^29.3.1",