Skip to content

Conversation

@eluce2
Copy link
Collaborator

@eluce2 eluce2 commented Jan 12, 2026

Summary

  • Create layout metadata fixtures (tests/fixtures/layout-metadata.ts)
  • Add mock fetch utility for mocking FM Data API calls (tests/utils/mock-fetch.ts)
  • Move E2E tests requiring live FM server to tests/e2e/
  • Create unit tests that use mocked metadata (11 tests)
  • Update vitest.config.ts to exclude e2e tests by default
  • Add test:e2e script for running E2E tests with doppler

Test plan

  • pnpm --filter @proofkit/typegen lint passes
  • pnpm --filter @proofkit/typegen typecheck passes
  • pnpm --filter @proofkit/typegen test passes (11 unit tests)

🤖 Generated with Claude Code


Note

Modernizes testing and docs across packages, separating fast unit tests from live E2E runs and adding reusable CLI/docs components.

  • Testing: Add mock fetch utilities and recorded fixtures for @proofkit/better-auth and @proofkit/fmdapi; create layout metadata fixtures and unit tests in @proofkit/typegen; move live tests to tests/e2e; update vitest.config.ts to exclude E2E by default; add test:e2e scripts and Turbo pipeline
  • CI: Simplify continuous-release.yml test job to run unit tests only (remove Doppler/OIDC/E2E); keep build after tests
  • Tooling: Add scripts/capture-responses.ts to record FM API responses for mocks; add vitest.config.ts per package with E2E exclusion
  • Docs/UI: Introduce PackageInstall component and enhance CliCommand (new packageName prop); update MDX guides to use these components and stable package refs

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

eluce2 and others added 5 commits January 12, 2026 11:16
- Add packageName prop to CliCommand for auto-versioning
- Create PackageInstall component for install commands
- Convert all hardcoded @beta references to use constant

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove fmodata E2E step and Doppler auth from continuous-release.yml.
Add root-level test:e2e script and turbo task for local E2E runs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 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>
- Move E2E tests (adapter.test.ts, migrate.test.ts) to tests/e2e/
- Create mock fetch utilities and OData response fixtures
- Add unit tests for adapter operations using mocked responses
- Update vitest.config.ts to exclude E2E tests
- Add test:e2e script for running E2E tests separately

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create layout metadata fixtures (tests/fixtures/layout-metadata.ts)
- Add mock fetch utility for mocking FM Data API calls (tests/utils/mock-fetch.ts)
- Move E2E tests requiring live FM server to tests/e2e/
- Create unit tests that use mocked metadata
- Update vitest.config.ts to exclude e2e tests by default
- Add test:e2e script for running E2E tests with doppler

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@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 5:32pm

@eluce2 eluce2 merged commit 2f2c31f into 01-12-test_better-auth_add_mock_infrastructure_for_unit_tests Jan 12, 2026
9 of 11 checks passed
const client = DataApi({
adapter: new OttoAdapter({
auth: config.auth,
db: config.db,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test silently passes when no error is thrown

Low Severity

The error handling test uses .catch() to make assertions, but if client.list() resolves successfully instead of rejecting, the catch block never executes and the test passes without verifying any assertions. This pattern can lead to false positives if the mock is misconfigured or the error handling behavior changes. The test should use await expect(...).rejects.toBeInstanceOf(FileMakerError) or similar to ensure the promise actually rejects.

Fix in Cursor Fix in Web

eluce2 added a commit that referenced this pull request Jan 12, 2026
## Summary
- Create layout metadata fixtures (`tests/fixtures/layout-metadata.ts`)
- Add mock fetch utility for mocking FM Data API calls (`tests/utils/mock-fetch.ts`)
- Move E2E tests requiring live FM server to `tests/e2e/`
- Create unit tests that use mocked metadata (11 tests)
- Update `vitest.config.ts` to exclude e2e tests by default
- Add `test:e2e` script for running E2E tests with doppler

## Test plan
- [x] `pnpm --filter @proofkit/typegen lint` passes
- [x] `pnpm --filter @proofkit/typegen typecheck` passes
- [x] `pnpm --filter @proofkit/typegen test` passes (11 unit tests)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Modernizes testing and docs across packages, separating fast unit tests from live E2E runs and adding reusable CLI/docs components.
> 
> - Testing: Add mock fetch utilities and recorded fixtures for `@proofkit/better-auth` and `@proofkit/fmdapi`; create layout metadata fixtures and unit tests in `@proofkit/typegen`; move live tests to `tests/e2e`; update `vitest.config.ts` to exclude E2E by default; add `test:e2e` scripts and Turbo pipeline
> - CI: Simplify `continuous-release.yml` test job to run unit tests only (remove Doppler/OIDC/E2E); keep build after tests
> - Tooling: Add `scripts/capture-responses.ts` to record FM API responses for mocks; add `vitest.config.ts` per package with E2E exclusion
> - Docs/UI: Introduce `PackageInstall` component and enhance `CliCommand` (new `packageName` prop); update MDX guides to use these components and stable package refs
> 
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 3e25bc9. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
eluce2 added a commit that referenced this pull request Jan 12, 2026
## Summary
- Create layout metadata fixtures (`tests/fixtures/layout-metadata.ts`)
- Add mock fetch utility for mocking FM Data API calls (`tests/utils/mock-fetch.ts`)
- Move E2E tests requiring live FM server to `tests/e2e/`
- Create unit tests that use mocked metadata (11 tests)
- Update `vitest.config.ts` to exclude e2e tests by default
- Add `test:e2e` script for running E2E tests with doppler

## Test plan
- [x] `pnpm --filter @proofkit/typegen lint` passes
- [x] `pnpm --filter @proofkit/typegen typecheck` passes
- [x] `pnpm --filter @proofkit/typegen test` passes (11 unit tests)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Modernizes testing and docs across packages, separating fast unit tests from live E2E runs and adding reusable CLI/docs components.
> 
> - Testing: Add mock fetch utilities and recorded fixtures for `@proofkit/better-auth` and `@proofkit/fmdapi`; create layout metadata fixtures and unit tests in `@proofkit/typegen`; move live tests to `tests/e2e`; update `vitest.config.ts` to exclude E2E by default; add `test:e2e` scripts and Turbo pipeline
> - CI: Simplify `continuous-release.yml` test job to run unit tests only (remove Doppler/OIDC/E2E); keep build after tests
> - Tooling: Add `scripts/capture-responses.ts` to record FM API responses for mocks; add `vitest.config.ts` per package with E2E exclusion
> - Docs/UI: Introduce `PackageInstall` component and enhance `CliCommand` (new `packageName` prop); update MDX guides to use these components and stable package refs
> 
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 3e25bc9. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
eluce2 added a commit that referenced this pull request Jan 12, 2026
test(better-auth): add mock infrastructure for unit tests

- Move E2E tests (adapter.test.ts, migrate.test.ts) to tests/e2e/
- Create mock fetch utilities and OData response fixtures
- Add unit tests for adapter operations using mocked responses
- Update vitest.config.ts to exclude E2E tests
- Add test:e2e script for running E2E tests separately

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

test(typegen): add mock infrastructure for unit tests (#103)

## Summary
- Create layout metadata fixtures (`tests/fixtures/layout-metadata.ts`)
- Add mock fetch utility for mocking FM Data API calls (`tests/utils/mock-fetch.ts`)
- Move E2E tests requiring live FM server to `tests/e2e/`
- Create unit tests that use mocked metadata (11 tests)
- Update `vitest.config.ts` to exclude e2e tests by default
- Add `test:e2e` script for running E2E tests with doppler

## Test plan
- [x] `pnpm --filter @proofkit/typegen lint` passes
- [x] `pnpm --filter @proofkit/typegen typecheck` passes
- [x] `pnpm --filter @proofkit/typegen test` passes (11 unit tests)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Establishes isolated unit testing with mocks and separates E2E runs across the repo.
> 
> - **Better Auth**: Add mock OData responses and `mock-fetch` utils; create comprehensive adapter unit tests; move adapter/migrate E2E to `tests/e2e`; add `test:e2e` script; update `vitest.config.ts` to exclude E2E; small refactor in `migrate.ts` for safer type normalization and explicit FM type mapping
> - **Typegen**: Add layout metadata fixtures and mock fetch utils; create unit tests using mocked metadata; move live E2E to `tests/e2e`; add `test:e2e` script; update `vitest.config.ts` to exclude E2E
> - **Fmodata**: Relocate E2E tests to `tests/e2e`; update `test:e2e` to run folder
> - **CLI**: Simplify `test` script to `vitest run`; update vitest config to exclude E2E-like test
> - **Repo scripts**: Tweak `scripts/ralph-once.sh` workflow command
> 
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 67a2fec. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

test(fmodata): move E2E tests to tests/e2e folder

Move e2e.test.ts and schema-manager.test.ts to tests/e2e/ so they're excluded from default test runs. Update test:e2e script to run entire e2e folder.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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