From 472a308b0357b50c46fd4a18b71052e336abe355 Mon Sep 17 00:00:00 2001 From: Connor Peet Date: Mon, 26 Jul 2021 10:54:03 -0700 Subject: [PATCH] testing: fix label not applying to root by default --- src/vs/workbench/api/common/extHostTesting.ts | 6 ++++++ 1 file changed, 6 insertions(+) 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;