Skip to content

Commit

Permalink
feat(jest): support shard CLI options (#1314) (#1315)
Browse files Browse the repository at this point in the history
  • Loading branch information
lme-agicap authored Nov 16, 2022
1 parent 686a75c commit 7ddad99
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/jest/scripts/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ simpleAppTestOptions=(
"yarn test|--no-cache|1|1|3|3|||"
"yarn test|--test-name-pattern=^AppComponent should create the app$|1|1|1|3|2||"
"yarn test|--reporters=default;--reporters=jest-junit|1|1|3|3||checkJunit"
"yarn test|--shard=1/2|1|1|3|3||"
)

multiAppTestOptions=(
Expand Down
4 changes: 4 additions & 0 deletions packages/jest/src/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,10 @@
"tsConfig": {
"description": "The path to the TypeScript configuration file.",
"type": "string"
},
"shard": {
"description": "The test suite shard to execute in a format of (?<shardIndex>\\d+)/(?<shardCount>\\d+).\n\nshardIndex describes which shard to select while shardCount controls the number of shards the suite should be split into.\n\nshardIndex and shardCount have to be 1-based, positive numbers, and shardIndex has to be lower than or equal to shardCount.\n\nWhen shard is specified the configured testSequencer has to implement a shard method.\n\nFor example, to split the suite into three shards, each running one third of the tests:",
"type": "string"
}
},
"additionalProperties": { "type": "array", "items": { "type": "string" } }
Expand Down

0 comments on commit 7ddad99

Please sign in to comment.