1
1
<!-- -
2
- lsp/ext.rs hash: 4b06686d086b7d9b
2
+ lsp/ext.rs hash: 6bc140531b403717
3
3
4
4
If you need to change the above hash to make the test pass, please check if you
5
5
need to adjust this doc as well and ping this issue:
@@ -416,7 +416,9 @@ interface TestItem {
416
416
range? : lc .Range | undefined ;
417
417
// A human readable name for this test
418
418
label: string ;
419
- icon: " package" | " module" | " test" ;
419
+ // The kind of this test item. Based on the kind,
420
+ // an icon is chosen by the editor.
421
+ kind: " package" | " module" | " test" ;
420
422
// True if this test may have children not available eagerly
421
423
canResolveChildren: boolean ;
422
424
// The id of the parent test in the test tree. If not present, this test
@@ -425,6 +427,10 @@ interface TestItem {
425
427
// The information useful for running the test. The client can use `runTest`
426
428
// request for simple execution, but for more complex execution forms
427
429
// like debugging, this field is useful.
430
+ // Note that this field includes some information about label and location as well, but
431
+ // those exist just for keeping things in sync with other methods of running runnables
432
+ // (for example using one consistent name in the vscode's launch.json) so for any propose
433
+ // other than running tests this field should not be used.
428
434
runnable? : Runnable | undefined ;
429
435
};
430
436
@@ -451,8 +457,14 @@ the same as the one in `experimental/discoverTest` response.
451
457
** Request:** ` RunTestParams `
452
458
453
459
``` typescript
454
- interface DiscoverTestParams {
460
+ interface RunTestParams {
461
+ // Id of the tests to be run. If a test is included, all of its children are included implicitly. If
462
+ // this property is undefined, then the server should simply run all tests.
455
463
include? : string [] | undefined ;
464
+ // An array of test ids the user has marked as excluded from the test included in this run; exclusions
465
+ // should apply after inclusions.
466
+ // May be omitted if no exclusions were requested. Server should not run excluded tests or
467
+ // any children of excluded tests.
456
468
exclude? : string [] | undefined ;
457
469
}
458
470
```
@@ -480,9 +492,16 @@ a `experimental/endRunTest` when is done.
480
492
** Notification:** ` ChangeTestStateParams `
481
493
482
494
``` typescript
483
- type TestState = { tag: " failed" ; message: string }
484
- | { tag: " passed" }
485
- | { tag: " started" };
495
+ type TestState = { tag: " passed" }
496
+ | {
497
+ tag: " failed" ;
498
+ // The standard error of the test, containing the panic message. Clients should
499
+ // render it similar to a terminal, and e.g. handle ansi colors.
500
+ message: string ;
501
+ }
502
+ | { tag: " started" }
503
+ | { tag: " enqueued" }
504
+ | { tag: " skipped" };
486
505
487
506
interface ChangeTestStateParams {
488
507
testId: string ;
0 commit comments