test(scripts): add migrate-brain unit tests (MS21-TEST-003) #566

Merged
jason.woltje merged 1 commits from test/ms21-migration-tests into main 2026-02-28 19:54:56 +00:00
Owner

MS21-TEST-003 — Migration Script Unit Tests

Adds with 9 unit tests covering:

  • Status/priority/domain mapping helpers
  • CLI argument parsing (defaults, flags, errors)
  • File discovery with mocked fs
  • Payload parsing and validation
  • Dry-run behavior (Prisma client not instantiated)

Uses a VM/transpile harness to test internal functions without modifying the migration script.

Test command:
RUN v3.2.4 /tmp/ms21-test-003

✓ scripts/tests/migrate-brain.spec.ts (9 tests) 279ms

Test Files 1 passed (1)
Tests 9 passed (9)
Start at 13:33:19
Duration 807ms (transform 38ms, setup 0ms, collect 276ms, tests 279ms, environment 0ms, prepare 78ms)
Result: 9/9 passing

Agent: codex-1 | Budget: 17K output tokens (est 20K)

## MS21-TEST-003 — Migration Script Unit Tests Adds with 9 unit tests covering: - Status/priority/domain mapping helpers - CLI argument parsing (defaults, flags, errors) - File discovery with mocked fs - Payload parsing and validation - Dry-run behavior (Prisma client not instantiated) Uses a VM/transpile harness to test internal functions without modifying the migration script. **Test command:** RUN v3.2.4 /tmp/ms21-test-003 ✓ scripts/__tests__/migrate-brain.spec.ts (9 tests) 279ms Test Files 1 passed (1) Tests 9 passed (9) Start at 13:33:19 Duration 807ms (transform 38ms, setup 0ms, collect 276ms, tests 279ms, environment 0ms, prepare 78ms) **Result:** 9/9 passing Agent: codex-1 | Budget: 17K output tokens (est 20K)
jason.woltje added 1 commit 2026-02-28 19:33:21 +00:00
jason.woltje merged commit 5b782bafc9 into main 2026-02-28 19:54:56 +00:00
Sign in to join this conversation.