From 4238466cbc9e0f52f4cee598cd210d38ded1395f Mon Sep 17 00:00:00 2001 From: Sheng Chen Date: Fri, 15 Dec 2023 13:54:15 +0800 Subject: [PATCH] Only register coverage test profile for insiders Signed-off-by: Sheng Chen --- src/controller/testController.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/controller/testController.ts b/src/controller/testController.ts index 05e1feea..d764bef8 100644 --- a/src/controller/testController.ts +++ b/src/controller/testController.ts @@ -3,7 +3,7 @@ import * as _ from 'lodash'; import * as path from 'path'; -import { CancellationToken, DebugConfiguration, Disposable, FileSystemWatcher, RelativePattern, TestController, TestItem, TestRun, TestRunProfileKind, TestRunRequest, tests, TestTag, Uri, window, workspace, WorkspaceFolder } from 'vscode'; +import { CancellationToken, DebugConfiguration, Disposable, env, FileSystemWatcher, RelativePattern, TestController, TestItem, TestRun, TestRunProfileKind, TestRunRequest, tests, TestTag, Uri, window, workspace, WorkspaceFolder } from 'vscode'; import { instrumentOperation, sendError, sendInfo } from 'vscode-extension-telemetry-wrapper'; import { refreshExplorer } from '../commands/testExplorerCommands'; import { IProgressReporter } from '../debugger.api'; @@ -34,7 +34,9 @@ export function createTestController(): void { testController.createRunProfile('Run Tests', TestRunProfileKind.Run, runHandler, true, runnableTag); testController.createRunProfile('Debug Tests', TestRunProfileKind.Debug, runHandler, true, runnableTag); - testController.createRunProfile('Run Tests with Coverage', TestRunProfileKind.Run, runHandler, false, runnableTag); + if (env.appName.includes('Insiders')) { + testController.createRunProfile('Run Tests with Coverage', TestRunProfileKind.Run, runHandler, false, runnableTag); + } testController.refreshHandler = () => { refreshExplorer();