From 0cfc73f6722c3465effd4d540d69337f4c49633c Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 3 Oct 2026 16:27:20 +0000 Subject: [PATCH 1/3] fix(test): add missing stackBlockX import and update test suite Co-authored-by: Ay0bhamii <201365190+Ay0bhamii@users.noreply.github.com> --- package-lock.json | 1 + package.json | 2 +- packages/game-core/index.test.ts | 14 ++------------ 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 851641a..a6400f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1380,6 +1380,7 @@ "version": "13.0.3", "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-13.0.3.tgz", "integrity": "sha512-RbOBxmLBG8uvFUc15X9+9SFemKcQ0WBuISBVkpuiaUB2qblC8UWlHEjdWVoZ8AdhSwmoEgsiXKfopX0CQxaACQ==", + "hasInstallScript": true, "license": "MIT", "dependencies": { "node-addon-api": "^8.0.0" diff --git a/package.json b/package.json index dc36293..326dd86 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "api": "tsx server/index.ts", "build": "tsc -b && vite build", "typecheck:server": "tsc -p tsconfig.server.json", - "test": "tsx --test packages/game-core/index.test.ts", + "test": "tsx --test packages/game-core/index.test.ts src/ui-format.test.ts", "preview": "vite preview --host" }, "dependencies": { diff --git a/packages/game-core/index.test.ts b/packages/game-core/index.test.ts index 1dc7c3a..e02ab85 100644 --- a/packages/game-core/index.test.ts +++ b/packages/game-core/index.test.ts @@ -1,6 +1,6 @@ import assert from "node:assert/strict"; import test from "node:test"; -import { createPuzzle, dailyGame, replay, simulateFlight } from "./index.js"; +import { createPuzzle, dailyGame, replay, simulateFlight, stackBlockX } from "./index.js"; test("same seed creates the same puzzle", () => { assert.deepEqual(createPuzzle("reaction", "abc"), createPuzzle("reaction", "abc")); @@ -8,7 +8,7 @@ test("same seed creates the same puzzle", () => { }); test("daily rotation always selects a ranked challenge", () => { - const ranked = new Set(["reaction", "color", "whack", "flight", "pop", "memory"]); + const ranked = new Set(["reaction", "color", "whack", "flight", "pop", "memory", "stack"]); for (const day of ["2026-09-01", "2026-09-02", "2026-09-03", "2026-09-04", "2026-09-05"]) assert.equal(ranked.has(dailyGame(day)), true); }); @@ -99,16 +99,6 @@ test("flight: a bird that never flaps falls to the ground and cannot finish", () assert.equal(noFlap.completed, false); }); -test("flight: a bird that never flaps falls to the ground and cannot finish", () => { - const idle = replay("flight", "seed-flight", [{ t: 8000, type: "key", value: "flap" }]); - assert.equal(idle.valid, true); - assert.equal(idle.completed, false); - assert.equal(idle.score, 0); - // Even a late flap cannot grant a passed pipe once the bird hits the floor. - const noFlap = replay("flight", "seed-flight", []); - assert.equal(noFlap.completed, false); -}); - test("flight: live horizon verdict never projects a future ground death", () => { const puzzle = createPuzzle("flight", "seed-flight"); if (puzzle.gameId !== "flight") return; From eb3df4391c4ebbb6d12b7821d0d1839de8ee9df8 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 3 Oct 2026 16:32:41 +0000 Subject: [PATCH 2/3] fix(test): add missing stackBlockX import and update test suite Co-authored-by: Ay0bhamii <201365190+Ay0bhamii@users.noreply.github.com> From d8bc68c69e8c2146a4d8eb74caf0c40696bb5d9c Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 3 Oct 2026 16:55:24 +0000 Subject: [PATCH 3/3] fix(test): add missing stackBlockX import and update test suite Co-authored-by: Ay0bhamii <201365190+Ay0bhamii@users.noreply.github.com>