test(oxlint/lsp): add test for .oxlintrc.json config change#19552
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. |
58b6c00 to
f369f67
Compare
.oxlintrc.json serverity change.oxlintrc.json config change
There was a problem hiding this comment.
Pull request overview
Adds an LSP regression test to verify diagnostics are refreshed after configuration file content changes (e.g. .oxlintrc.json / oxlint.config.ts) by simulating workspace/didChangeWatchedFiles and waiting for a diagnostic refresh.
Changes:
- Extend the LSP test client helper with
didChangeWatchedFiles()and aworkspace/diagnostic/refreshwaiter. - Add a new
file_config_changeVitest suite with fixtures and snapshots for config-change scenarios. - Introduce fixtures for both
.oxlintrc.json-based config andoxlint.config.ts-based config.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| apps/oxlint/test/lsp/utils.ts | Adds test utilities to simulate watched-file changes and await diagnostic refresh, plus a helper to snapshot diagnostics before/after a config content change. |
| apps/oxlint/test/lsp/file_config_change/file_config_change.test.ts | New test suite covering diagnostics behavior across config changes. |
| apps/oxlint/test/lsp/file_config_change/snapshots/file_config_change.test.ts.snap | Snapshots for the new config-change test suite. |
| apps/oxlint/test/lsp/file_config_change/fixtures/** | New fixtures representing config files and lint targets used by the test. |
f369f67 to
35e48ce
Compare
Merge activity
|
> Adds an LSP regression test to verify diagnostics are refreshed after configuration file content changes (e.g. .oxlintrc.json / oxlint.config.ts) by simulating workspace/didChangeWatchedFiles and waiting for a diagnostic refresh. This shows the error for #19526 where the config is not refreshed and still shows an error. This is fixed in the downstream PR
35e48ce to
ad43ccc
Compare

This shows the error for #19526 where the config is not refreshed and still shows an error. This is fixed in the downstream PR