diff --git a/src/test/datascience/data-viewing/dataViewer.unit.test.ts b/src/test/datascience/data-viewing/dataViewer.unit.test.ts index 3e3c8a26317..c046eb44a1a 100644 --- a/src/test/datascience/data-viewing/dataViewer.unit.test.ts +++ b/src/test/datascience/data-viewing/dataViewer.unit.test.ts @@ -4,7 +4,7 @@ 'use strict'; import { anything, instance, mock, verify, when } from 'ts-mockito'; -import { ConfigurationChangeEvent, EventEmitter } from 'vscode'; +import { ConfigurationChangeEvent, EventEmitter, Uri } from 'vscode'; import { ApplicationShell } from '../../../platform/common/application/applicationShell'; import { IApplicationShell, @@ -39,14 +39,16 @@ suite('DataScience - DataViewer', () => { dataProvider = mock(JupyterVariableDataProvider); const settings = mock(JupyterSettings); const settingsChangedEvent = new EventEmitter(); + const context: IExtensionContext = mock(); when(settings.onDidChange).thenReturn(settingsChangedEvent.event); when(configService.getSettings(anything())).thenReturn(instance(settings)); const configChangeEvent = new EventEmitter(); - when(workspaceService.onDidChangeConfiguration).thenReturn(configChangeEvent.event); + when(workspaceService.onDidChangeConfiguration).thenReturn(configChangeEvent.event); when(dataProvider.getDataFrameInfo(anything(), anything())).thenResolve({}); + when(context.extensionUri).thenReturn(Uri.parse('/')); dataViewer = new DataViewer( instance(webPanelProvider), @@ -55,7 +57,7 @@ suite('DataScience - DataViewer', () => { instance(applicationShell), new MockMemento(), instance(mock()), - instance(mock()) + instance(context) ); }); test('Data viewer showData calls gets dataFrame info from data provider', async () => {