Commit 660975b
authored
Use a global test client for all unit tests (#130)
* Gather test utilities into a single `test/` folder
And rename a few files to reflect new location
* Only register capabilities if the client supports at least one
Otherwise we end up sending our test client a request here that it isn't expecting at this time, since it didn't say it supported these capabilities
* Return comparable `Id`s, and add `initialized()` support
This is definitely required for lsp-server, otherwise it can't proceed, but is also the right thing to do as a client in general
* Move initialization/shutdown test to integration test
With new support for sending `initialized()` too
* Use a single global test client in all unit tests
* Enforce single tracing subscriber even during tests
* Remove `--test-threads 1` from CI1 parent f7ac7e4 commit 660975b
File tree
16 files changed
+312
-264
lines changed- .github/workflows
- crates
- lsp_test/src
- lsp
- src
- test
- tests
- tests_macros/src
16 files changed
+312
-264
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
| 57 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
| |||
0 commit comments