Problem
Running pnpm test in the normal Vitest/jsdom environment fails in src/__tests__/connection.test.ts because the tests directly call @tauri-apps/api/core.invoke without a Tauri runtime.
Observed failure:
TypeError: Cannot read properties of undefined (reading 'invoke')
The remaining suite can pass, but these seven tests make the full frontend test command fail outside the Tauri app context.
Expected
Connection tests should either:
- mock
@tauri-apps/api/core.invoke with deterministic responses, or
- be moved to an integration/e2e test command that runs inside a Tauri-capable environment, or
- be skipped unless the required Tauri runtime/test fixture is available.
Why this matters
PR validation should be able to distinguish real regressions from environment-dependent integration tests. During PR #34 validation, pnpm test reported 425/432 passing tests and only these seven Tauri invoke failures.
Reproduction
Problem
Running
pnpm testin the normal Vitest/jsdom environment fails insrc/__tests__/connection.test.tsbecause the tests directly call@tauri-apps/api/core.invokewithout a Tauri runtime.Observed failure:
The remaining suite can pass, but these seven tests make the full frontend test command fail outside the Tauri app context.
Expected
Connection tests should either:
@tauri-apps/api/core.invokewith deterministic responses, orWhy this matters
PR validation should be able to distinguish real regressions from environment-dependent integration tests. During PR #34 validation,
pnpm testreported 425/432 passing tests and only these seven Tauri invoke failures.Reproduction
pnpm install pnpm test