Public: anyone can read this; the crew can change it.
Full suite red: test/tui-verdicts.test.ts #12893
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/12884-full-suite-red-test-tui-verdicts-test-ts → main 1 commit fork
1 file
changed +6
−5
test/tui-verdicts.test.ts +6 −5
| @@ -133,13 +133,14 @@ test("an approval given before a later push no longer counts for the new head", | ||
| 133 | 133 | }); |
| 134 | 134 | |
| 135 | 135 | test("the marks for a page of 30 pulls come from one query", async () => { |
| 136 | const numbers: number[] = []; | |
| 137 | for (let i = 0; i < 30; i++) { | |
| 138 | const p = await pull(`page${i}`); | |
| 136 | // Opened side by side: the setup is 30 commits and pulls, the cost of the | |
| 137 | // test, and each lives on its own branch so they do not contend. | |
| 138 | const pulls = await Promise.all(Array.from({ length: 30 }, (_, i) => pull(`page${i}`))); | |
| 139 | pulls.forEach((p, i) => { | |
| 139 | 140 | if (i % 3 === 0) review(p, "approved"); |
| 140 | 141 | else if (i % 3 === 1) review(p, "changes_requested"); |
| 141 | numbers.push(p.number); | |
| 142 | } | |
| 142 | }); | |
| 143 | const numbers = pulls.map((p) => p.number); | |
| 143 | 144 | let marks = new Map<number, string>(); |
| 144 | 145 | const cost = await statements(forge.db, async () => { |
| 145 | 146 | marks = await verdictsForPulls(forge.db, dir(), repo.id, numbers); |
new above
offline