Repository navigation
Description
Summary
Running the Deno unit test suite for packages/supabase (pnpm test:deno, i.e. deno test --allow-all --config packages/supabase/tests/deno.json packages/supabase/tests) fails immediately with syntax errors in 3 files under packages/supabase/tests/unit/. Each has a string literal with an unescaped/mismatched quote, which is a parse error, not a test assertion failure — the entire file fails to even load.
Found while running nightly regression tests (deno isn't preinstalled in the sandbox this ran in, so this was verified with deno 2.9.3 installed manually via the official installer).
Broken files
-
packages/supabase/tests/unit/ccpa-gpc.test.ts:61'Enabled value should be '1' per GPC specification'Unescaped
'around1inside a single-quoted string. -
packages/supabase/tests/unit/ccpa-notifications.test.ts:422userName: 'José O'Brien",Unescaped apostrophe in "O'Brien", and the string opens with
'but closes with". -
packages/supabase/tests/unit/ccpa-pdf-generator.test.ts:356data.personalInformation.lastName = 'O'Brien"Same pattern as Bump next from 15.4.1 to 15.4.7 #2.
Error output
error: SyntaxError: Expected ',', got 'numeric literal (1, 1)'
|
61 | 'Enabled value should be '1' per GPC specification'
| ~
at .../packages/supabase/tests/unit/ccpa-gpc.test.ts:61:33
```//similar for the other two files.
## Why this wasn't caught
None of the repo's GitHub Actions workflows (`.github/workflows/*.yml`) actually invoke `test:deno`, `packages/supabase/tests`, or `run-tests.sh` — only `functions/api/__tests__/**` (a separate directory) is exercised in CI (`api-tests.yml`). So this suite only runs for local contributors who manually run `pnpm test:deno`, and nobody has noticed.
`git log -S` shows these lines were last touched in #334 (2026-06-09, an unrelated onboarding-UI commit, likely a mass reformat/rebase) but the quote bug traces back further — there's an earlier commit titled "fix: continue resolving TypeScript quote errors" that apparently didn't catch these three.
## Suggested fix
Escape the apostrophes (e.g. `\'1\'` / `"José O'Brien"` with consistent quote style) in the 3 lines above. Small, mechanical fix — no logic changes needed.
## Separately (not filed as an issue, for context)
Even after fixing the syntax, most files in `packages/supabase/tests/unit/` use extension-less relative imports (e.g. `'../shared/assert'`) that Deno 2.x can't resolve without `--unstable-sloppy-imports` or explicit `.ts` extensions, so the suite needs that flag (or extensions added) to actually run. Flagging here in case whoever picks this up wants to fix both at once, but happy to file separately if preferred.
---
Filed automatically by a nightly regression-test run.
Activity
fix(tests): restore the Deno suites, and stop failures passing silently
thinkclay commentedon Jul 30, 2026
Fixed in
6c6e5be0a. The three CCPA files parse, and the unit suite now runs: 104 passed, 0 failed, from zero tests executing.Note
ccpa-gpc.test.tshad two mismatched literals, not one — Deno reports only the first syntax error per file, so the second (line 492) only appeared after fixing line 61. Worth knowing for any similar sweep.fix(supabase): repair mismatched-quote syntax errors in 8 test files (#…