Skip to content

Run every scripts/*.test.ts in the test gate - #433

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-7122-scriptsaffected-dev-reset-setup-memory-tests-never-run-in
Aug 29, 2026
Merged

TheGreatAxios merged 3 commits into
mainfrom
cl-7122-scriptsaffected-dev-reset-setup-memory-tests-never-run-in

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Fixes CL-7122 — https://linear.app/abklabs/issue/CL-7122

Problem

Root package.json's test script hand-listed bun test scripts/run-all.test.ts (package.json:20), and run-all.ts test only discovers workspace packages under apps/*, packages/*, tools/*, workflows/*, vendor/intx/* (scripts/run-all.ts:33-39). scripts/affected.test.ts, scripts/dev.test.ts, scripts/reset.test.ts, and scripts/setup-memory.test.ts (33 tests total) live at the top level of scripts/ and were never wired into either path, so they never ran locally or in CI.

Change

  • Widen the root test script from bun test scripts/run-all.test.ts to bun test ./scripts/*.test.ts (package.json:20). The shell expands this glob before bun test sees it, so it resolves to exactly the five top-level suites and does not recurse into scripts/e2e/** or scripts/checks/test/**, which keep their own dedicated CI jobs.

This is wiring only — no test logic changed. Files now covered by bun run test that weren't before:

  • scripts/affected.test.ts
  • scripts/dev.test.ts
  • scripts/reset.test.ts
  • scripts/setup-memory.test.ts
    (scripts/run-all.test.ts was already covered.)

Tests

Ran bun test ./scripts/*.test.ts directly — 46 pass across the 5 files (13 from run-all.test.ts + 33 from the four newly-wired suites), confirming the glob picks up exactly the intended files and all previously-unrun tests are green.

The root test script only ran scripts/run-all.test.ts by name, so
scripts/affected.test.ts, dev.test.ts, reset.test.ts, and
setup-memory.test.ts (33 tests) never ran locally or in CI. Widen the
bun test invocation to the shell-expanded scripts/*.test.ts glob,
which picks up exactly the five top-level suites and does not recurse
into scripts/e2e or scripts/checks/test (those keep their own jobs).

Fixes CL-7122.
@TheGreatAxios
TheGreatAxios force-pushed the cl-7122-scriptsaffected-dev-reset-setup-memory-tests-never-run-in branch from f59d3c7 to e0617e4 Compare August 29, 2026 04:46

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critique · request-changes

The scripts/*.test.ts glob wires scripts/db-setup.test.ts into build-test, which has no Postgres.

  • package.json:20 x scripts/db-setup.test.ts:23 — bun still runs the describe callback under describe.skip, so dbTargetFromUrl("") throws DATABASE_URL is not a parseable URL.
  • scripts/e2e/db-setup.test.ts:36-46 already returns before constructing a URL; this file does not.

build-test job 33234630138 is this PR. Fix the skip path (or list the five unit-safe files) before merge.

GitHub will not accept request-changes on the author's own PR; this comment is the review.

…ed-dev-reset-setup-memory-tests-never-run-in
bun still runs the describe callback under describe.skip, so
dbTargetFromUrl at describe scope crashed build-test when the glob
wired this file in. Parse and connect inside the test instead.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critique · comment

Skip path is fixed. dbTargetFromUrl and loadPostgres run only inside the test body, so bun still collecting under describe.skip no longer parses an empty DATABASE_URL.

  • scripts/db-setup.test.ts:19-47 — describe callback only registers the test
  • scripts/db-setup.test.ts:39-41 — reset-refusal assertion unchanged

build-test should go green on this head. Merge only after every check is green.

@TheGreatAxios
TheGreatAxios merged commit d485877 into main Aug 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant