Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vscode] Stub TestController invalidateTestResults #12944

Merged
merged 1 commit into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
## v1.42.0

- [core] fixed logger level propagation when log config file changes at runtime [#12566](https://github.com/eclipse-theia/theia/pull/12566) - Contributed on behalf of STMicroelectronics
- [vscode] stub TestController invalidateTestResults [#12944](https://github.com/eclipse-theia/theia/pull/12944) - Contributed by STMicroelectronics
- [vsx-registry] added a hint to extension fetching ENOTFOUND errors [#12858](https://github.com/eclipse-theia/theia/pull/12858) - Contributed by STMicroelectronics

## v1.41.0 - 08/31/2023
Expand Down
4 changes: 3 additions & 1 deletion packages/plugin-ext/src/plugin/plugin-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ import {
createRunProfile,
createTestRun,
testItemCollection,
createTestItem
createTestItem,
invalidateTestResults
} from './stubs/tests-api';
import { TimelineExtImpl } from './timeline';
import { ThemingExtImpl } from './theming';
Expand Down Expand Up @@ -1010,6 +1011,7 @@ export function createAPIFactory(
createRunProfile,
createTestRun,
createTestItem,
invalidateTestResults,
dispose: () => undefined,
};
},
Expand Down
4 changes: 4 additions & 0 deletions packages/plugin-ext/src/plugin/stubs/tests-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,7 @@ export const createTestItem = (
range: undefined,
error: undefined,
});

export const invalidateTestResults = (
items?: theia.TestItem | readonly theia.TestItem[]
): void => undefined;
19 changes: 19 additions & 0 deletions packages/plugin/src/theia.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15980,6 +15980,25 @@ export module '@theia/plugin' {
*/
createTestItem(id: string, label: string, uri?: Uri): TestItem;

/**
* Marks an item's results as being outdated. This is commonly called when
* code or configuration changes and previous results should no longer
* be considered relevant. The same logic used to mark results as outdated
* may be used to drive {@link TestRunRequest.continuous continuous test runs}.
*
* If an item is passed to this method, test results for the item and all of
* its children will be marked as outdated. If no item is passed, then all
* test owned by the TestController will be marked as outdated.
*
* Any test runs started before the moment this method is called, including
* runs which may still be ongoing, will be marked as outdated and deprioritized
* in the editor's UI.
*
* @param item Item to mark as outdated. If undefined, all the controller's items are marked outdated.
* @stubbed
*/
invalidateTestResults(items?: TestItem | readonly TestItem[]): void;

/**
* Unregisters the test controller, disposing of its associated tests
* and unpersisted results.
Expand Down