Skip to content

Conversation

@eluce2
Copy link
Collaborator

@eluce2 eluce2 commented Jan 12, 2026

  • 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 noreply@anthropic.com


Note

Builds a robust test setup that decouples unit tests from a live FileMaker server and isolates E2E tests.

  • Mock infra: Add tests/utils/mock-fetch.ts, tests/fixtures/responses.ts (captured FM responses), and tests/utils/mock-server-url.ts; refactor unit tests to stub global fetch and use mockResponses
  • Capture script: New scripts/capture-responses.ts to hit a live server, sanitize URLs, and regenerate tests/fixtures/responses.ts
  • Test reorg: Move live tests to tests/e2e/** and add new E2E specs; convert existing client-methods.test.ts to pure unit tests using mocks
  • Config/scripts: Update package.json with test:e2e and capture commands and simplify test; adjust vitest.config.ts to exclude tests/e2e/** by default
  • Minor test cleanups: consistent imports (../src/index), afterEach vi.unstubAllGlobals(), and small assertion/name fixes

Written by Cursor Bugbot for commit beec7bf. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Jan 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
proofkit-docs Ready Ready Preview Jan 12, 2026 6:58pm

Copy link
Collaborator Author

eluce2 commented Jan 12, 2026

@eluce2 eluce2 force-pushed the 01-12-test_fmdapi_add_mock_infrastructure_for_unit_tests branch from 3ec4bb4 to 2ad82ee Compare January 12, 2026 17:29
@eluce2 eluce2 force-pushed the 01-12-ci_remove_e2e_tests_from_ci_workflow branch from e004b71 to e1d1214 Compare January 12, 2026 17:29
@eluce2 eluce2 marked this pull request as ready for review January 12, 2026 17:32
Copy link
Collaborator Author

eluce2 commented Jan 12, 2026

Merge activity

  • Jan 12, 6:56 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jan 12, 6:58 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jan 12, 6:58 PM UTC: @eluce2 merged this pull request with Graphite.

@eluce2 eluce2 changed the base branch from 01-12-ci_remove_e2e_tests_from_ci_workflow to graphite-base/102 January 12, 2026 18:56
@eluce2 eluce2 changed the base branch from graphite-base/102 to main January 12, 2026 18:56
- 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 <noreply@anthropic.com>
@eluce2 eluce2 force-pushed the 01-12-test_fmdapi_add_mock_infrastructure_for_unit_tests branch from 2ad82ee to beec7bf Compare January 12, 2026 18:57
@eluce2 eluce2 merged commit 6dba78e into main Jan 12, 2026
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants