-
Notifications
You must be signed in to change notification settings - Fork 189
Description
Currently, there are very limited tests for both the language server and the VS Code extension (E2E tests).
We do get some of the testing done via the linter and formatter tests but not much for the server specific behavior.
Following is an enumeration of the existing tests in the language server:
Most, if not all, of the above tests are in consequence of bug reports.
Following existing servers have a mock server that they use for testing purposes:
- https://github.com/facebook/starlark-rust/blob/main/starlark_lsp/src/test.rs
- https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/tests/slow-tests/support.rs
- https://github.com/supabase-community/postgres_lsp/blob/main/crates/pglt_lsp/tests/server.rs (Uses
tower-lsp)
A mock server implementation would be immensely helpful but there's one limitation that I see which is that the settings indexer walks through the actual file system. It probably won't be an issue in the red-knot server given that we can use the in-memory file system but we would need to have some kind of solution for the Ruff language server.