Update npm packages (73 packages including @jqhtml 2.3.36)
Update npm registry domain from privatenpm.hanson.xyz to npm.internal.hanson.xyz 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
20
node_modules/playwright/lib/runner/testGroups.js
generated
vendored
20
node_modules/playwright/lib/runner/testGroups.js
generated
vendored
@@ -92,15 +92,23 @@ function createTestGroups(projectSuite, expectedParallelism) {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function filterForShard(shard, testGroups) {
|
||||
function filterForShard(shard, weights, testGroups) {
|
||||
weights ??= Array.from({ length: shard.total }, () => 1);
|
||||
if (weights.length !== shard.total)
|
||||
throw new Error(`PWTEST_SHARD_WEIGHTS number of weights must match the shard total of ${shard.total}`);
|
||||
const totalWeight = weights.reduce((a, b) => a + b, 0);
|
||||
let shardableTotal = 0;
|
||||
for (const group of testGroups)
|
||||
shardableTotal += group.tests.length;
|
||||
const shardSize = Math.floor(shardableTotal / shard.total);
|
||||
const extraOne = shardableTotal - shardSize * shard.total;
|
||||
const currentShard = shard.current - 1;
|
||||
const from = shardSize * currentShard + Math.min(extraOne, currentShard);
|
||||
const to = from + shardSize + (currentShard < extraOne ? 1 : 0);
|
||||
const shardSizes = weights.map((w) => Math.floor(w * shardableTotal / totalWeight));
|
||||
const remainder = shardableTotal - shardSizes.reduce((a, b) => a + b, 0);
|
||||
for (let i = 0; i < remainder; i++) {
|
||||
shardSizes[i % shardSizes.length]++;
|
||||
}
|
||||
let from = 0;
|
||||
for (let i = 0; i < shard.current - 1; i++)
|
||||
from += shardSizes[i];
|
||||
const to = from + shardSizes[shard.current - 1];
|
||||
let current = 0;
|
||||
const result = /* @__PURE__ */ new Set();
|
||||
for (const group of testGroups) {
|
||||
|
||||
Reference in New Issue
Block a user