mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
testing: fix test wrapper not including ranges and not dealing with sync discovered root
This commit is contained in:
@@ -552,7 +552,9 @@ export const createDefaultDocumentTestRoot = async <T>(
|
||||
TestItemFilteredWrapper.removeFilter(document);
|
||||
});
|
||||
|
||||
return TestItemFilteredWrapper.getWrapperForTestItem(root, document);
|
||||
const wrapper = TestItemFilteredWrapper.getWrapperForTestItem(root, document);
|
||||
wrapper.refreshMatch();
|
||||
return wrapper;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -623,6 +625,7 @@ export class TestItemFilteredWrapper extends TestItemImpl {
|
||||
this.description = actual.description;
|
||||
this.error = actual.error;
|
||||
this.status = actual.status;
|
||||
this.range = actual.range;
|
||||
this.resolveHandler = actual.resolveHandler;
|
||||
|
||||
const wrapperApi = getPrivateApiFor(this);
|
||||
@@ -648,7 +651,7 @@ export class TestItemFilteredWrapper extends TestItemImpl {
|
||||
* if the test itself has a location that matches, or if any of its
|
||||
* children do.
|
||||
*/
|
||||
private refreshMatch() {
|
||||
public refreshMatch() {
|
||||
const didMatch = this._cachedMatchesFilter;
|
||||
|
||||
// The `children` of the wrapper only include the children who match the
|
||||
|
||||
Reference in New Issue
Block a user