Repository navigation
Description
Summary
Nightly regression run on main (ee96fd40e) found that 8 test files under packages/supabase contain string-literal syntax errors (mismatched quote characters, e.g. '...text 'nested' more" — opens with ', has an unescaped inner ', closes with "). Because Deno's deno test parses every matching file in a glob before running any of them, a single broken file aborts the entire run with a SyntaxError before any test executes.
All 8 files were last touched by the same commit, 5473d98b3 ("fix(ui): onboarding error toast + JobForm draft floor + typed submit params (SC-112, SC-123, SC-124)", #334, 2026-06-09) — over 6 weeks ago. None of the affected suites are wired into CI (see below), so this has produced zero test signal since that commit landed.
Affected files
| File | Line(s) |
|---|---|
packages/supabase/tests/routers/background-checks-disputes.test.ts |
101 |
packages/supabase/tests/routers/ccpa.test.ts |
231 |
packages/supabase/tests/routers/personality-assessment.test.ts |
52 |
packages/supabase/tests/unit/ccpa-gpc.test.ts |
61, 492 |
packages/supabase/tests/unit/ccpa-notifications.test.ts |
422 |
packages/supabase/tests/unit/ccpa-pdf-generator.test.ts |
356 |
packages/supabase/functions/trpc/__tests__/map-functions.test.ts |
435, 491 |
packages/supabase/functions/trpc/__tests__/profile-experience.test.ts |
215-217 |
packages/supabase/functions/trpc/__tests__/universities.test.ts |
51-52, 99, 125, 128, 130-131 |
Examples:
// tests/routers/ccpa.test.ts:231
correctionDetails: 'Please update my profile name from 'Test' to "Updated Test"',
// tests/routers/personality-assessment.test.ts:52
type IPIPDomain = "A" | "E' | 'N' | 'C' | 'O';
// functions/trpc/__tests__/map-functions.test.ts:435
'Job status should be 'open'",Confirmed via deno test --config packages/supabase/tests/deno.json packages/supabase/tests (fails immediately with SyntaxError: Expected ',', got 'Test' etc.) and cross-checked with a standalone TypeScript-parser syntax pass over every *.test.ts under packages/supabase (87 files checked, these 8 are the only ones with parse errors).
Why this went unnoticed
packages/supabase/tests/routers/**andpackages/supabase/tests/unit/**are run via the roottest:denoscript, which isn't invoked by any GitHub Actions workflow.packages/supabase/functions/trpc/__tests__/**is run viatest:endpoints(functions/trpc/__tests__/run-tests.sh), also not invoked by any workflow..github/workflows/api-tests.ymlonly runsfunctions/api/__tests__/routes/*.test.tsandfunctions/api/__tests__/integration/*.test.ts, which are unaffected.
So this whole layer of tRPC/router regression tests has had no CI signal at all since #334 merged, and has been fully broken (won't even parse) for that entire time.
Suggested fix
- Fix the mismatched quotes in the 9 locations above (all look like accidental quote-character swaps, not intentional escaping).
- Wire
pnpm test:denoandpnpm test:endpoints(or equivalent) into CI so a repeat of this doesn't go unnoticed for weeks.
How this was found
Automated nightly regression task running against main in a scratch environment. HEAD matched origin/main exactly at the time of the run; no local changes were made (working tree left untouched per task constraints — this issue reports the finding rather than fixing it directly).
Activity
fix(tests): restore the Deno suites, and stop failures passing silently
thinkclay commentedon Jul 30, 2026
Fixed in
6c6e5be0a.Five files, not eight — the parser found six broken literals across
background-checks-disputes,ccpa,ccpa-gpc(two),ccpa-notificationsandccpa-pdf-generator. All the same signature: opened with', closed with", or an unescaped inner quote.The report's core claim was right and understated: it wasn't only the syntax errors keeping these suites dark. Also required —
pnpm test:deno(tRPC router tests) fails to type-check via its documented command #421)tests/import_map.jsonwas missingpdf-lib/jszipand pinned supabase-js 2.38.4 against the runtime's 2.86.0, so the CCPA suites couldn't load their subject modulesadmin.auth.admin.getUserByEmail(), which isn't in the GoTrue admin APIpayments/legal-agreementsreferenced atokens.officepersona that never existedAny one of those would have kept the suites at zero. Unit suite is now 104 passing, router suite type-checks clean.
Two real defects surfaced once the tests ran — a flaky-not-wrong
>vs>=boundary inisVerificationExpired, and a stale GPC source expectation that contradicted the DB enum. Both detailed in the commit.And the reason it went unnoticed for six weeks:
pnpm prepushwasnx build & nx test & wait && write-stamp. Barewaitreturns 0 regardless of job status, so the stamp was written and "✅ Pre-push validated" printed even when nx reported "Failed tasks". Now inscripts/prepush.sh, waiting per pid, plus a load-check that catches this whole class — verified to fail on an injected parse error and pass when clean.fix(supabase): repair mismatched-quote syntax errors in 8 test files (#…