Skip to content

Commit 3ec8a47

Browse files
author
Fred Wu
committed
fix(tests): await plot manager initialization in session fixtures
1 parent 27d84c5 commit 3ec8a47

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎src/test/suite/session.test.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ suite('Session Communication', () => {
5252
let commandMarkerPath: string | undefined;
5353
let plotPanelCleanup: (() => void) | undefined;
5454

55-
setup(() => {
55+
setup(async () => {
5656
sandbox = sinon.createSandbox();
5757
sandbox.stub(processTree, 'getProcessAncestors').resolves([]);
5858
sandbox.stub(vscode.commands, 'registerCommand'); // prevent "command already exists" error
@@ -65,7 +65,9 @@ suite('Session Communication', () => {
6565
getActiveSessionId: () => session.activeSession?.sessionId,
6666
});
6767
session.deploySessionWatcher(extension_root);
68-
sandbox.stub(extension, 'globalPlotManager').value(plotViewer.initializePlotManager());
68+
sandbox
69+
.stub(extension, 'globalPlotManager')
70+
.value(await plotViewer.initializePlotManager());
6971
});
7072

7173
teardown(async () => {

0 commit comments

Comments
 (0)