Skip to content

[codex] Isolate Windows helper tests from Firebase#7933

Open
tianmind-studio wants to merge 4 commits into
BasedHardware:mainfrom
tianmind-studio:codex/windows-firebase-test-imports
Open

[codex] Isolate Windows helper tests from Firebase#7933
tianmind-studio wants to merge 4 commits into
BasedHardware:mainfrom
tianmind-studio:codex/windows-firebase-test-imports

Conversation

@tianmind-studio

Copy link
Copy Markdown
Contributor

Summary

  • Mock unused API client imports in pure Windows renderer helper tests.
  • Mock the agent LLM import in goal helper tests.
  • Keep these tests from initializing Firebase Auth during Vitest collection.

Why

These tests exercise prompt builders, parsers, and tag helpers, but importing the modules also pulled in apiClient / agentLLM, which initializes Firebase Auth through firebase.ts. On a fresh Windows test run without real Vite Firebase env values, Vitest failed at collection with FirebaseError: Firebase: Error (auth/invalid-api-key) before assertions could run.

Validation

  • Before the fix: npx --yes pnpm@11.6.0 test failed 4 suites with auth/invalid-api-key.
  • npx --yes pnpm@11.6.0 exec vitest run src/renderer/src/lib/appMemories.test.ts src/renderer/src/lib/calendarExtract.test.ts src/renderer/src/lib/gmailExtract.test.ts src/renderer/src/lib/goals.test.ts -> 4 files passed, 18 tests passed.
  • npx --yes pnpm@11.6.0 test -> 76 files passed, 1 skipped; 508 tests passed, 3 skipped.
  • npx --yes pnpm@11.6.0 run typecheck -> passed.
  • npx --yes pnpm@11.6.0 exec prettier --check src/renderer/src/lib/appMemories.test.ts src/renderer/src/lib/calendarExtract.test.ts src/renderer/src/lib/gmailExtract.test.ts src/renderer/src/lib/goals.test.ts -> passed.
  • git diff --check -> passed.

Note

npx --yes pnpm@11.6.0 run lint still fails on this Windows checkout because of existing CRLF Prettier warnings and pre-existing lint errors outside these changed files; this PR keeps scope to the Firebase import-time test failure.

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.

1 participant