Skip to content

Commit bc47e98

Browse files
Clear cache for notebook editors
1 parent b01b5b2 commit bc47e98

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/vscode-common/src/testUtil/openNewEditor.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ export async function openNewEditor(
2121

2222
await (await getParseTreeApi()).loadLanguage(languageId);
2323

24+
(await getCursorlessApi()).testHelpers!.clearCache();
25+
2426
const editor = await vscode.window.showTextDocument(
2527
document,
2628
openBeside ? vscode.ViewColumn.Beside : undefined,
@@ -36,8 +38,6 @@ export async function openNewEditor(
3638
// Many times running these tests opens the sidebar, which slows performance. Close it.
3739
vscode.commands.executeCommand("workbench.action.closeSidebar");
3840

39-
(await getCursorlessApi()).testHelpers!.clearCache();
40-
4141
return editor;
4242
}
4343

@@ -98,6 +98,8 @@ export async function openNewNotebookEditor(
9898

9999
await (await getParseTreeApi()).loadLanguage(language);
100100

101+
(await getCursorlessApi()).testHelpers!.clearCache();
102+
101103
// FIXME: There seems to be some timing issue when you create a notebook
102104
// editor
103105
await waitForEditorToOpen();

0 commit comments

Comments
 (0)