Commit 1c6b0a5
committed
feat(neotest): Expose doctests on Neotest summary window
The current neotest integration reports any 'test' runnable as a valid
position, except for 'doctests'.
This commit introduces logic necessary to also expose 'doctests' as part
of the summary, so it can be visualized and trigger.
It tries to approach it with the minimal changes, so exported labels
follows the same name convention as test runnables, without indication
they are doctests on the summary window. This can be changed if
necessary.
In order for neotest to consider these items part of the tree, we must
also return a 'pos' with `pos.type = 'file'`, otherwhise those test
items would not have a parent, and it prevents being displayed. This is
done by reporting a 'file' always, but I'm not sure what is the reason
behind returning only if `#namespaces > 0`.1 parent 4987d41 commit 1c6b0a5
3 files changed
+16
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
9 | 14 | | |
10 | 15 | | |
11 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
199 | 197 | | |
200 | 198 | | |
201 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
0 commit comments