test(lsp): add simple tests for textDocument/didOpen|didChange|didClose and textDocument/codeAction#16404
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive tests for the LSP (Language Server Protocol) server's text document lifecycle notifications (textDocument/didOpen, textDocument/didChange, textDocument/didClose) and code action functionality (textDocument/codeAction). The changes include both unit-level tests in worker.rs and integration-level tests in tests.rs.
- Adds test helper functions for creating LSP requests for document lifecycle and code actions
- Implements
get_code_actions_or_commandsinFakeToolto support testing - Adds unit test
test_code_action_collectioninworker.rsto test the worker's code action collection - Adds integration tests for file notifications and code actions with and without results
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| crates/oxc_language_server/src/worker.rs | Adds import for code action types and unit test for code action collection at the worker level |
| crates/oxc_language_server/src/tests.rs | Adds test helper functions (did_open, did_change, did_close, code_action), implements get_code_actions_or_commands in FakeTool, and adds three integration tests for file notifications and code actions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merge activity
|
b86e60b to
804144f
Compare
…ose` and `textDocument/codeAction` (#16404) > This PR adds comprehensive tests for the LSP (Language Server Protocol) server's text document lifecycle notifications (textDocument/didOpen, textDocument/didChange, textDocument/didClose) and code action functionality (textDocument/codeAction). The changes include both unit-level tests in worker.rs and integration-level tests in tests.rs.
efc6e01 to
ceaeb54
Compare
…ose` and `textDocument/codeAction` (#16404) > This PR adds comprehensive tests for the LSP (Language Server Protocol) server's text document lifecycle notifications (textDocument/didOpen, textDocument/didChange, textDocument/didClose) and code action functionality (textDocument/codeAction). The changes include both unit-level tests in worker.rs and integration-level tests in tests.rs.
ceaeb54 to
af67e80
Compare
…ose` and `textDocument/codeAction` (oxc-project#16404) > This PR adds comprehensive tests for the LSP (Language Server Protocol) server's text document lifecycle notifications (textDocument/didOpen, textDocument/didChange, textDocument/didClose) and code action functionality (textDocument/codeAction). The changes include both unit-level tests in worker.rs and integration-level tests in tests.rs.

Uh oh!
There was an error while loading. Please reload this page.