Skip to content

Commit a2ca44f

Browse files
author
Kartik Raj
committed
Fix tests
1 parent 0dddd3d commit a2ca44f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/configuration/interpreterSelector/commands/setInterpreter.unit.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ suite('Set Interpreter Command', () => {
8080
workspace = TypeMoq.Mock.ofType<IWorkspaceService>();
8181
interpreterService = mock<IInterpreterService>();
8282
when(interpreterService.refreshPromise).thenReturn(undefined);
83+
when(interpreterService.triggerRefresh()).thenResolve();
8384
workspace.setup((w) => w.rootPath).returns(() => 'rootPath');
8485

8586
configurationService.setup((x) => x.getSettings(TypeMoq.It.isAny())).returns(() => pythonSettings.object);
@@ -472,9 +473,9 @@ suite('Set Interpreter Command', () => {
472473
const refreshButtonCallback = actualParameters!.customButtonSetup?.callback;
473474
expect(refreshButtonCallback).to.not.equal(undefined, 'Callback not set');
474475

475-
when(interpreterService.triggerRefresh(anything(), anything())).thenResolve();
476+
when(interpreterService.triggerRefresh(anything(), 'ui')).thenResolve();
476477
await refreshButtonCallback!({} as QuickPick<QuickPickItem>); // Invoke callback, meaning that the refresh button is clicked.
477-
verify(interpreterService.triggerRefresh(anything(), anything())).once();
478+
verify(interpreterService.triggerRefresh(anything(), 'ui')).once();
478479
});
479480

480481
test('Events to update quickpick updates the quickpick accordingly', async () => {

0 commit comments

Comments
 (0)