Split The code is public; the app answers only to the crew.
The check is red on `main` and production is not serving: one test steps a whole match and times out at 5 s #171
Check · Review · Land · Live done — Landed and live in production.
scout/cs:scout/166-the-check-is-red-on-main-and-production → main 1 commit fork
2 files
changed +11
−5
src/client/bots.test.ts +1 −1
| @@ -256,7 +256,7 @@ test("the carrier gets the bomb down inside the round clock", () => { | ||
| 256 | 256 | // `scripts/measure.ts` over 177 rounds, before and after the bots could |
| 257 | 257 | // hear), and five rounds cannot tell 54% from a bad afternoon. |
| 258 | 258 | expect(planted.length).toBeGreaterThanOrEqual(5); |
| 259 | }); | |
| 259 | }, 10_000); // ten rounds played out headlessly, twice the default timeout for a slower box | |
| 260 | 260 | |
| 261 | 261 | test("a bomb on the floor is still picked up by a living terrorist", () => { |
| 262 | 262 | const world = createWorld(RULES, "you", "ct", 1, 4242); |
src/client/world.test.ts +10 −4
| @@ -638,7 +638,7 @@ test("a match plays itself to the end inside its own time", () => { | ||
| 638 | 638 | expect(world.match.phase).toBe("match_over"); |
| 639 | 639 | expect(world.match.matchWinner).not.toBe(null); |
| 640 | 640 | expect(Math.max(world.match.score.t, world.match.score.ct)).toBe(2); |
| 641 | }); | |
| 641 | }, 10_000); // a real playthrough, twice the default timeout for a slower box | |
| 642 | 642 | |
| 643 | 643 | test("restoreWorld(snapshot(world, id)) round-trips score, round, money and gear", () => { |
| 644 | 644 | const world = createWorld(SHORT, "me", "ct", 5, 301); |
| @@ -719,9 +719,15 @@ test("a snapshot whose score already reaches winScore is refused: a decided matc | ||
| 719 | 719 | test("past half time, a restored player lands back in their own slot, not the pre-swap one", () => { |
| 720 | 720 | const world = createWorld(SHORT, "me", "ct", 5, 777); |
| 721 | 721 | const half = halfTime(SHORT); |
| 722 | // Play the match out for real — elimination, the bomb, the clock, whatever | |
| 723 | // ends a round — until the side swap `saved.ts` warns about has happened. | |
| 724 | for (let t = 0; t < 900 && world.match.round <= half; t += TICK) update(world, TICK, NO_INPUT); | |
| 722 | // What ends a round — elimination, the bomb, the clock — is `match.ts`'s | |
| 723 | // business and is proven elsewhere; here it is `rules.tick`'s own timeout | |
| 724 | // path, forced to fire on the very next tick, so the same `update` code | |
| 725 | // that flips sides at half time runs for real without playing a round out | |
| 726 | // to reach it. `world.match.round` is never poked directly. | |
| 727 | while (world.match.round <= half) { | |
| 728 | world.match.timer = TICK; | |
| 729 | update(world, TICK, NO_INPUT); | |
| 730 | } | |
| 725 | 731 | expect(world.match.round).toBeGreaterThan(half); // otherwise this test proves nothing |
| 726 | 732 | |
| 727 | 733 | world.me.primary = "awp"; |
new above
offline