Skip to content

Commit

Permalink
docs: testSequencer example use destructured arguments (#12915)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanRowe committed Jun 10, 2022
1 parent 531000b commit 920b0e3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docs/Configuration.md
Expand Up @@ -2031,9 +2031,9 @@ class CustomSequencer extends Sequencer {
* Sharding is applied before sorting
*/
shard(tests, {shardIndex, shardCount}) {
const shardSize = Math.ceil(tests.length / options.shardCount);
const shardStart = shardSize * (options.shardIndex - 1);
const shardEnd = shardSize * options.shardIndex;
const shardSize = Math.ceil(tests.length / shardCount);
const shardStart = shardSize * (shardIndex - 1);
const shardEnd = shardSize * shardIndex;

return [...tests]
.sort((a, b) => (a.path > b.path ? 1 : -1))
Expand Down
6 changes: 3 additions & 3 deletions website/versioned_docs/version-28.0/Configuration.md
Expand Up @@ -1553,9 +1553,9 @@ class CustomSequencer extends Sequencer {
* Sharding is applied before sorting
*/
shard(tests, {shardIndex, shardCount}) {
const shardSize = Math.ceil(tests.length / options.shardCount);
const shardStart = shardSize * (options.shardIndex - 1);
const shardEnd = shardSize * options.shardIndex;
const shardSize = Math.ceil(tests.length / shardCount);
const shardStart = shardSize * (shardIndex - 1);
const shardEnd = shardSize * shardIndex;

return [...tests]
.sort((a, b) => (a.path > b.path ? 1 : -1))
Expand Down
6 changes: 3 additions & 3 deletions website/versioned_docs/version-28.1/Configuration.md
Expand Up @@ -1557,9 +1557,9 @@ class CustomSequencer extends Sequencer {
* Sharding is applied before sorting
*/
shard(tests, {shardIndex, shardCount}) {
const shardSize = Math.ceil(tests.length / options.shardCount);
const shardStart = shardSize * (options.shardIndex - 1);
const shardEnd = shardSize * options.shardIndex;
const shardSize = Math.ceil(tests.length / shardCount);
const shardStart = shardSize * (shardIndex - 1);
const shardEnd = shardSize * shardIndex;

return [...tests]
.sort((a, b) => (a.path > b.path ? 1 : -1))
Expand Down

0 comments on commit 920b0e3

Please sign in to comment.