Skip to content

Commit 3ec4bb4

Browse files
eluce2claude
andcommitted
test(fmdapi): add mock infrastructure for unit tests
- Create capture script for recording live API responses - Add mock-fetch utility for mocking global fetch in tests - Reorganize tests: move E2E tests to tests/e2e/ - Create mock-based unit tests that don't require live FM server - Update vitest config to exclude E2E tests by default - Add test:e2e and capture scripts to package.json Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent e004b71 commit 3ec4bb4

File tree

11 files changed

+1706
-208
lines changed

11 files changed

+1706
-208
lines changed

packages/fmdapi/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@
4444
"format": "biome format --write .",
4545
"dev": "tsc --watch",
4646
"ci": "pnpm build && pnpm check-format && pnpm publint --strict && pnpm test",
47-
"test": "doppler run -- vitest run",
47+
"test": "vitest run",
48+
"test:e2e": "doppler run -- vitest run tests/e2e",
49+
"capture": "doppler run -- npx tsx scripts/capture-responses.ts",
4850
"typecheck": "tsc --noEmit",
4951
"changeset": "changeset",
5052
"release": "pnpm build && changeset publish --access public",

0 commit comments

Comments
 (0)