Lines Matching defs:shard
487 let { testNamePatterns, shard } = options;
499 if (shard != null) {
500 validateObject(shard, 'options.shard');
501 // Avoid re-evaluating the shard object in case it's a getter
502 shard = { __proto__: null, index: shard.index, total: shard.total };
504 validateInteger(shard.total, 'options.shard.total', 1);
505 validateInteger(shard.index, 'options.shard.index');
507 if (shard.index <= 0 || shard.total < shard.index) {
508 throw new ERR_OUT_OF_RANGE('options.shard.index', `>= 1 && <= ${shard.total} ("options.shard.total")`, shard.index);
512 throw new ERR_INVALID_ARG_VALUE('options.shard', watch, 'shards not supported with watch mode');
538 if (shard) {
539 testFiles = ArrayPrototypeFilter(testFiles, (_, index) => index % shard.total === shard.index - 1);