Conversation
Its setUp builds the full production symbol-knowledge stack and most of its cases assert on the real SymbolSource state after dispatch. The filename now matches what the test is. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Mocks DocumentManagerInterface, SymbolSinkInterface, and InvalidatableInterface. Unlike the four query handlers, this one mutates: the test asserts on the collaborator calls each notification produces rather than on a return shape. - didOpen: documentManager.open(uri, lang, version, text), then symbols.openDocument with the document the manager returns from get(). - didChange: documentManager.update(uri, lastText, version), then symbols.updateDocument. Empty contentChanges short-circuits. - didClose: symbols.closeDocument(uri), invalidator.invalidate(uri), documentManager.close(uri). The invalidator drop is why the next on-disk query re-reads disk rather than the pre-edit value. Also drops two integration tests the unit test now covers identically: testSupports and testDidCloseInvalidatesTheOnDiskCacheSoTheNextQueryReReadsDisk (the latter already mocked the invalidator and asserted only on the invalidate() call). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #662 +/- ##
=========================================
Coverage 99.73% 99.73%
Complexity 1903 1903
=========================================
Files 136 136
Lines 4882 4882
=========================================
Hits 4869 4869
Misses 13 13 ☔ View full report in Codecov by Harness. |
Firehed
changed the base branch from
main
to
text-document-sync-handler-rename
October 1, 2026 00:46
Firehed
marked this pull request as ready for review
October 1, 2026 00:47
Owner
Author
|
Rebase conflicted after #663 merged. Replaced by a fresh branch; new PR coming. |
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.
Stacked on #663. Fifth and last handler to get a real unit test, following the pattern from the four query handlers.
What changed
TextDocumentSyncHandlerTestundertests/Handler/that mocks the three interface collaborators. Unlike the query handlers this one mutates, so the test asserts on the collaborator calls each notification produces rather than on a return shape.testSupports, and thetestDidCloseInvalidatesTheOnDiskCacheSoTheNextQueryReReadsDiskcase that already mocked the invalidator and asserted only oninvalidate()).🤖 Generated with Claude Code