Skip to content

Commit

Permalink
Disable telemetry reporting for unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TwitchBronBron committed Jan 31, 2022
1 parent c39c3b2 commit f232285
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/extension.spec.ts
Expand Up @@ -6,7 +6,7 @@ let Module = require('module');
import * as extension from './extension';
import { vscode, vscodeLanguageClient } from './mockVscode.spec';
import { brightScriptCommands } from './BrightScriptCommands';
import { LanguageServerManager, languageServerManager } from './LanguageServerManager';
import { languageServerManager } from './LanguageServerManager';
import * as rta from 'roku-test-automation';

const sinon = createSandbox();
Expand Down
10 changes: 9 additions & 1 deletion src/mockVscode.spec.ts
Expand Up @@ -6,11 +6,19 @@ afterEach(() => {
});

export let vscode = {
env: {
//disable all telemetry reporting during unit tests
telemetryConfiguration: {
isUsageEnabled: false,
isErrorsEnabled: false,
isCrashEnabled: false
}
},
CompletionItem: class { },
CodeLens: class { },
CodeAction: class { },
Diagnostic: class { },
CallHierarchyItem: class {},
CallHierarchyItem: class { },
StatusBarAlignment: {
Left: 1,
Right: 2
Expand Down

0 comments on commit f232285

Please sign in to comment.