mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Add test explorer
This commit is contained in:
parent
916914418a
commit
44be2432f5
19 changed files with 1083 additions and 172 deletions
|
@ -68,6 +68,37 @@ export const viewItemTree = new lc.RequestType<ViewItemTreeParams, string, void>
|
|||
"rust-analyzer/viewItemTree",
|
||||
);
|
||||
|
||||
export type DiscoverTestParams = { testId?: string | undefined };
|
||||
export type RunTestParams = {
|
||||
include?: string[] | undefined;
|
||||
exclude?: string[] | undefined;
|
||||
};
|
||||
export type TestItem = {
|
||||
id: string;
|
||||
label: string;
|
||||
icon: "package" | "module" | "test";
|
||||
canResolveChildren: boolean;
|
||||
parent?: string | undefined;
|
||||
textDocument?: lc.TextDocumentIdentifier | undefined;
|
||||
range?: lc.Range | undefined;
|
||||
runnable?: Runnable | undefined;
|
||||
};
|
||||
export type DiscoverTestResults = { tests: TestItem[]; scope: string[] };
|
||||
export type TestState = { tag: "failed"; message: string } | { tag: "passed" } | { tag: "started" };
|
||||
export type ChangeTestStateParams = { testId: string; state: TestState };
|
||||
export const discoverTest = new lc.RequestType<DiscoverTestParams, DiscoverTestResults, void>(
|
||||
"experimental/discoverTest",
|
||||
);
|
||||
export const discoveredTests = new lc.NotificationType<DiscoverTestResults>(
|
||||
"experimental/discoveredTests",
|
||||
);
|
||||
export const runTest = new lc.RequestType<RunTestParams, void, void>("experimental/runTest");
|
||||
export const abortRunTest = new lc.NotificationType0("experimental/abortRunTest");
|
||||
export const endRunTest = new lc.NotificationType0("experimental/endRunTest");
|
||||
export const changeTestState = new lc.NotificationType<ChangeTestStateParams>(
|
||||
"experimental/changeTestState",
|
||||
);
|
||||
|
||||
export type AnalyzerStatusParams = { textDocument?: lc.TextDocumentIdentifier };
|
||||
|
||||
export interface FetchDependencyListParams {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue