OU

/claim #71

Summary

Adds focused Vitest coverage for SQL dump import behavior in src/import/dump.ts.

Covered behavior:

  • strips an actual SQLite format 3 header before execution
  • parses multiline SQL statements while skipping comments and blank lines
  • executes a final statement without a trailing semicolon
  • accepts comments-only dumps without executing statements
  • returns 207 with accurate details for mixed success/failure execution
  • returns 500 when multipart parsing fails
  • rejects non-File sqlFile form values
  • restores the final console.error spy to avoid mock leakage

This is test-only and intentionally avoids the active CSV, JSON, RLS, cache, operation, worker, handler, allowlist, Durable Object, and plugin coverage PR areas.

Verification

  • corepack pnpm exec vitest run src/import/dump.test.ts - 13 passed
  • corepack pnpm exec vitest run src/import/dump.test.ts --coverage.enabled true --coverage.include src/import/dump.ts --coverage.reporter text --coverage.thresholds.lines=0 --coverage.thresholds.branches=0 --coverage.thresholds.functions=0 --coverage.thresholds.statements=0 - src/import/dump.ts at 100% statements, 96.15% branches, 100% functions, 100% lines
  • corepack pnpm exec prettier --check src/import/dump.test.ts - passed
  • git diff --check -- src/import/dump.test.ts - passed with CRLF warning only
  • corepack pnpm exec vitest run - dump tests pass; existing unrelated RLS failures remain in src/rls/index.test.ts

Demo video

Claim

Total prize pool $250
Total paid $0
Status Pending
Submitted May 12, 2026
Last updated May 12, 2026

Contributors

KA

kaziiza

@kaziiza

100%

Sponsors

OU

Outerbase (YC W23)

@outerbase

$250