diff --git a/src/vs/workbench/api/common/extHostTesting.ts b/src/vs/workbench/api/common/extHostTesting.ts index 0df698b2576..e301d90ffaf 100644 --- a/src/vs/workbench/api/common/extHostTesting.ts +++ b/src/vs/workbench/api/common/extHostTesting.ts @@ -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(); const proxy = this.proxy;