Public: anyone can read this; the crew can change it.

Full suite red: test/app-home-batched.test.ts #12267

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

torque/forge:torque/12193-full-suite-red-test-app-home-batched-tes → main 1 commit fork

  • Merged. torque/12193-full-suite-red-test-app-home-batched-tes was merged into main as 20352e6.

Review

Sign in to review this change.
1 file changed +10 −2
test/app-home-batched.test.ts +10 −2
@@ -280,8 +280,16 @@ async function statementsByText(path: string): Promise<Map<string, number>> {
280280 } finally {
281281 door.query = original;
282282 }
283 const total = (m: Map<string, number>) => [...m.values()].reduce((a, b) => a + b, 0);
284 if (best === undefined || total(seen) < total(best)) best = seen;
283 // Background work only adds statements, and not the same ones each read: a statement
284 // counts as the page's own when every read ran it, at the fewest times any read did.
285 if (best === undefined) best = seen;
286 else {
287 for (const key of [...best.keys()]) {
288 const n = Math.min(best.get(key)!, seen.get(key) ?? 0);
289 if (n === 0) best.delete(key);
290 else best.set(key, n);
291 }
292 }
285293 }
286294 return best!;
287295 }

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs