Skip to content

fix: update tests for Effect-wrapped repository and reconcile dependencies - #68

Merged
suguanYang merged 2 commits into
stagingfrom
fix/wangbinqi/staging-test-failures
May 13, 2026
Merged

suguanYang merged 2 commits into
stagingfrom
fix/wangbinqi/staging-test-failures

Conversation

@suguanYang

Copy link
Copy Markdown
Contributor

Summary

Fixes 3 test failures on staging:

  • chat/route-service.test.ts — Use expect.any(Function) for repository assertions since chatTurnPersistence.createRepository() now wraps service methods in adaptor functions
  • reconcile.test.ts — Return Promises from loadReconcile mock defaults (vi.fn().mockResolvedValue(undefined)) so Effect.tryPromise doesn't fail on bare vi.fn() returning undefined
  • reconcile.test.ts — Add 4th "parsing" arg to markSourceFailed expectation to match updated lifecycle signature

Test Plan

  • src/domains/chat/route-service.test.ts — 5/5 pass
  • src/domains/sources/reconcile.test.ts — 6/6 pass

…ncies

- Use expect.any(Function) for chat route repository assertions since
  chatTurnPersistence.createRepository() now wraps service methods
- Return Promises from reconcile mock defaults so Effect.tryPromise
  doesn't fail on bare vi.fn() (which returns undefined)
- Add 4th "parsing" arg to markSourceFailed expectation to match
  updated lifecycle function signature
@vercel

vercel Bot commented May 13, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
knowhere-notebook-staging Ready Ready Preview, Comment May 13, 2026 10:46am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
knowhere-notebook Ignored Ignored Preview May 13, 2026 10:46am

Request Review

…age size

- Remove obsolete search test from chunks-panel.test.ts (search was removed
  from the component in 9ee238e)
- Switch workspace/client.test.ts from stubbing global fetch to mocking
  workspaceRouteClient (now uses Effect FetchHttpClient)
- Update page size from 100 to 50 in workspace-shell test assertion
  (changed in 9ee238e)
@suguanYang
suguanYang merged commit fda619d into staging May 13, 2026
7 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.

1 participant