@sparkdotfi/common-mocha-sharded-runner
v0.2.0-20251014.fc890b4c
Published
Executes a subset (shard) of all found tests. Great for sharding e2e tests across multiple runners.
Downloads
227
Readme
mocha-sharded-runner
Executes a subset (shard) of all found tests. Great for sharding e2e tests across multiple runners.
Setup
Add to package.json:
//...
"test-e2e:sharded": "mocha-sharded-runner --pattern \"**/*.test.ts\" --config ../../.mocharc.json",and Github Actions config:
- run: pnpm run test-e2e:sharded --shard ${{ matrix.shard }} --total-shards ${{ matrix.total-shards }}
working-directory: packages/e2e-tests