From 86406bf3662b482b3049dae41a82252f99803770 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Tue, 1 Jan 2019 21:01:55 -0800 Subject: [PATCH 1/3] Misc --- gulpfile.js | 1 + 1 file changed, 1 insertion(+) diff --git a/gulpfile.js b/gulpfile.js index 4b29f86ded68..0414fd1acb88 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -811,6 +811,7 @@ function getFilesToProcess(fileList) { * @param {hygieneOptions} options */ function getFileListToProcess(options) { + return []; const mode = options ? options.mode : 'all'; const gulpSrcOptions = { base: '.' }; From 912bd1f0fbbca3a1c793234702fa1fc257aa7374 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Thu, 28 Mar 2019 10:09:57 -0700 Subject: [PATCH 2/3] Capture telemetry when tests are disabled --- news/3 Code Health/4801.md | 1 + src/client/telemetry/constants.ts | 1 + src/client/telemetry/index.ts | 1 + src/client/unittests/display/main.ts | 3 +++ 4 files changed, 6 insertions(+) create mode 100644 news/3 Code Health/4801.md diff --git a/news/3 Code Health/4801.md b/news/3 Code Health/4801.md new file mode 100644 index 000000000000..a5d91744a4b4 --- /dev/null +++ b/news/3 Code Health/4801.md @@ -0,0 +1 @@ +Capture telemetry when tests are disabled. diff --git a/src/client/telemetry/constants.ts b/src/client/telemetry/constants.ts index 8e1daa26434a..872cc51a07fa 100644 --- a/src/client/telemetry/constants.ts +++ b/src/client/telemetry/constants.ts @@ -37,6 +37,7 @@ export enum EventName { DEBUGGER_ATTACH_TO_CHILD_PROCESS = 'DEBUGGER.ATTACH_TO_CHILD_PROCESS', DEBUGGER_CONFIGURATION_PROMPTS = 'DEBUGGER.CONFIGURATION.PROMPTS', UNITTEST_STOP = 'UNITTEST.STOP', + UNITTEST_DISABLE = 'UNITTEST.DISABLE', UNITTEST_RUN = 'UNITTEST.RUN', UNITTEST_DISCOVER = 'UNITTEST.DISCOVER', UNITTEST_CONFIGURE = 'UNITTEST.CONFIGURE', diff --git a/src/client/telemetry/index.ts b/src/client/telemetry/index.ts index 16db68445694..98c78af9bc7f 100644 --- a/src/client/telemetry/index.ts +++ b/src/client/telemetry/index.ts @@ -308,6 +308,7 @@ export interface IEventNamePropertyMapping { [EventName.UNITTEST_DISCOVER]: TestDiscoverytTelemetry; [EventName.UNITTEST_RUN]: TestRunTelemetry; [EventName.UNITTEST_STOP]: never | undefined; + [EventName.UNITTEST_DISABLE]: never | undefined; [EventName.UNITTEST_VIEW_OUTPUT]: never | undefined; [EventName.UPDATE_PYSPARK_LIBRARY]: never | undefined; [EventName.WORKSPACE_SYMBOLS_BUILD]: never | undefined; diff --git a/src/client/unittests/display/main.ts b/src/client/unittests/display/main.ts index 9a446f43bb91..4fd236bc2f6c 100644 --- a/src/client/unittests/display/main.ts +++ b/src/client/unittests/display/main.ts @@ -8,6 +8,8 @@ import { IConfigurationService } from '../../common/types'; import { UnitTests } from '../../common/utils/localize'; import { noop } from '../../common/utils/misc'; import { IServiceContainer } from '../../ioc/types'; +import { captureTelemetry } from '../../telemetry'; +import { EventName } from '../../telemetry/constants'; import { CANCELLATION_REASON } from '../common/constants'; import { ITestsHelper, Tests } from '../common/types'; import { ITestResultDisplay } from '../types'; @@ -144,6 +146,7 @@ export class TestResultDisplay implements ITestResultDisplay { this.discoverCounter = 0; } + @captureTelemetry(EventName.UNITTEST_DISABLE) // tslint:disable-next-line:no-any private async disableTests(): Promise { const configurationService = this.serviceContainer.get(IConfigurationService); From 39395240927d189122ac58762b6e6035d9f448dc Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Thu, 28 Mar 2019 10:11:47 -0700 Subject: [PATCH 3/3] Oops --- gulpfile.js | 1 - 1 file changed, 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 0414fd1acb88..4b29f86ded68 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -811,7 +811,6 @@ function getFilesToProcess(fileList) { * @param {hygieneOptions} options */ function getFileListToProcess(options) { - return []; const mode = options ? options.mode : 'all'; const gulpSrcOptions = { base: '.' };