Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add --parallel flag yarn test cmd #538

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ describe('Legacy Test Example', function () {

# Performance optimizations

Tests using `yarn test` will, by default run in parallel. See the [hardhat docs](https://hardhat.org/hardhat-runner/docs/guides/test-contracts#running-tests-in-parallel) for more information about parallelized testing. If you want to run the tests sequentially, use `yarn test:sequential`. Parallel tests may require increasing the timeout, you can set this in the `mocha` settings of the [hardhat config file](./hardhat.config.ts).

For faster runs of your tests and scripts, consider skipping ts-node's type checking by setting the environment variable `TS_NODE_TRANSPILE_ONLY` to `1` in hardhat's environment. For more details see [the documentation](https://hardhat.org/guides/typescript.html#performance-optimizations).

# Releases
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const config: HardhatUserConfig = {
exclude: ['test'],
},
mocha: {
timeout: 60000, // 60 seconds // increase the timeout for subdomain validation tests
timeout: 90_000, // 90 seconds // increase the timeout for subdomain validation tests
},
};

Expand Down
3 changes: 2 additions & 1 deletion packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"typechain:osx": "ts-node scripts/generate-typechain-osx.ts",
"typechain:osx-versions": "ts-node scripts/generate-typechain-osx-versions.ts",
"typechain": "yarn typechain:osx && yarn typechain:osx-versions",
"test": "hardhat test",
"test": "hardhat test --parallel",
"test:sequential": "hardhat test",
"build": "hardhat compile && yarn typechain",
"build:npm": "rollup --config rollup.config.ts",
"coverage": "hardhat coverage --solcoverjs ./.solcover.js",
Expand Down
Loading