testing: fix test wrapper not including ranges and not dealing with sync discovered root
This commit is contained in:
parent
3c4b64079d
commit
4eee5c6ee5
2 changed files with 12 additions and 2 deletions
7
.vscode/launch.json
vendored
7
.vscode/launch.json
vendored
|
@ -199,6 +199,13 @@
|
||||||
"name": "Attach to VS Code",
|
"name": "Attach to VS Code",
|
||||||
"browserAttachLocation": "workspace",
|
"browserAttachLocation": "workspace",
|
||||||
"port": 9222,
|
"port": 9222,
|
||||||
|
"trace": true,
|
||||||
|
"outFiles": [
|
||||||
|
"${workspaceFolder}/out/**/*.js"
|
||||||
|
],
|
||||||
|
"resolveSourceMapLocations": [
|
||||||
|
"${workspaceFolder}/out/**/*.js"
|
||||||
|
],
|
||||||
"perScriptSourcemaps": "yes"
|
"perScriptSourcemaps": "yes"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -552,7 +552,9 @@ export const createDefaultDocumentTestRoot = async <T>(
|
||||||
TestItemFilteredWrapper.removeFilter(document);
|
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.description = actual.description;
|
||||||
this.error = actual.error;
|
this.error = actual.error;
|
||||||
this.status = actual.status;
|
this.status = actual.status;
|
||||||
|
this.range = actual.range;
|
||||||
this.resolveHandler = actual.resolveHandler;
|
this.resolveHandler = actual.resolveHandler;
|
||||||
|
|
||||||
const wrapperApi = getPrivateApiFor(this);
|
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
|
* if the test itself has a location that matches, or if any of its
|
||||||
* children do.
|
* children do.
|
||||||
*/
|
*/
|
||||||
private refreshMatch() {
|
public refreshMatch() {
|
||||||
const didMatch = this._cachedMatchesFilter;
|
const didMatch = this._cachedMatchesFilter;
|
||||||
|
|
||||||
// The `children` of the wrapper only include the children who match the
|
// The `children` of the wrapper only include the children who match the
|
||||||
|
|
Loading…
Reference in a new issue