test: run the cache and recall unit tests CI never ran - #58
Merged
Merged
Conversation
…ocks src/services/cache.test.ts and src/tools/recall.test.ts sit outside the unit config's include (tests/unit/**), so they never ran. Move them and fix the imports. recall.test.ts: use plain-function mock factories (vi.fn implementations were cleared by clearMocks, routing recall to the free tier), mock local-vector-search to force the Supabase branch, and update two copy assertions to current wording. Tests: +36 now run (cache 26, recall 10); unit suite 1401 -> 1437, all pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Run the cache and recall unit tests that CI never ran
src/services/cache.test.tsandsrc/tools/recall.test.tslive outside the unit config'sinclude(tests/unit/**/*.test.ts). They have never run in CI. This PR moves them intotests/unit/and repairs them so they pass.Changes
tests/unit/services/andtests/unit/tools/, with imports pointed at../../../src/....vi.fn().mockReturnValue(...)inside a hoistedvi.mockfactory. The suite-wideclearMocksstripped those implementations, sohasSupabase()returnedundefinedand recall silently took its free-tier branch. The factories are now plain functions.local-vector-searchis mocked as not ready, so recall takes the Supabase branch the tests assert on.supabase-clientgains the exports recall now calls.Evidence
These edits were uncommitted work from 2026-08-08 in a local worktree. Test-only change, so no version bump.
🤖 Generated with Claude Code