testing: fix label not applying to root by default

This commit is contained in:
Connor Peet 2021-07-26 10:54:03 -07:00
parent d88f3a6b6d
commit 472a308b03
No known key found for this signature in database
GPG key ID: CF8FD2EA0DBC61BD

View file

@ -56,8 +56,14 @@ export class ExtHostTesting implements ExtHostTestingShape {
* Implements vscode.test.registerTestProvider
*/
public createTestController(controllerId: string, label: string): vscode.TestController {
if (this.controllers.has(controllerId)) {
throw new Error(`Attempt to insert a duplicate controller with ID "${controllerId}"`);
}
const disposable = new DisposableStore();
const collection = disposable.add(new SingleUseTestCollection(controllerId));
collection.root.label = label;
const profiles = new Map<number, vscode.TestRunProfile>();
const proxy = this.proxy;