Skip to content

test: cover export dump null serialization#165

Open
thedalbee wants to merge 1 commit into
outerbase:mainfrom
thedalbee:codex/export-dump-null-coverage-71
Open

test: cover export dump null serialization#165
thedalbee wants to merge 1 commit into
outerbase:mainfrom
thedalbee:codex/export-dump-null-coverage-71

Conversation

@thedalbee
Copy link
Copy Markdown

/claim #71

Summary

Adds a focused, non-overlapping coverage slice for SQL export dumps in src/export/dump.ts.

Covered behavior:

  • NULL cell values now serialize as SQL NULL instead of producing invalid empty INSERT values like INSERT INTO users VALUES (1, );.
  • A table whose schema lookup returns no rows still emits its row data instead of failing or stopping the dump.
  • Existing string escaping behavior remains covered.

This is scoped to export dump generation and intentionally avoids the active CSV/import/RLS/cache/allowlist/operation/worker/handler/DO/LiteREST/plugin coverage PR areas.

Verification

  • pnpm exec vitest run src/export/dump.test.ts - passed, 7 tests.
  • pnpm exec vitest run src/export/dump.test.ts --coverage.enabled true --coverage.include src/export/dump.ts --coverage.reporter text --coverage.reportsDirectory coverage-export-dump --coverage.thresholds.lines=0 --coverage.thresholds.branches=0 --coverage.thresholds.functions=0 --coverage.thresholds.statements=0 - passed; src/export/dump.ts at 100% statements, branches, functions, and lines.
  • pnpm exec prettier --check src/export/dump.ts src/export/dump.test.ts - passed.
  • git diff --check - passed.
  • pnpm exec vitest run - export dump suite passed; current repo baseline still has 4 unrelated src/rls/index.test.ts failures.
  • pnpm exec tsc --noEmit - current repo baseline has unrelated type errors in plugins/cdc, src/cache/index.test.ts, src/do.test.ts, and src/operation.ts.

Demo video

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant