fix: distribute rest files over shards by marionebl · Pull Request #13476 · jestjs/jest (original) (raw)
Summary
Sharding breaks execution by producing groups of length 0.
This was caused b naively using Math.ceil to determine the uniform shard size; this affects cases where both n % Math.ceil(n / s) === 0 and n % s !== 0 are true (n is number of tests, s is chosen shard count).