Skip to content

Commit

Permalink
Close sidebar when running vscode tests (#2797)
Browse files Browse the repository at this point in the history
## Checklist

- [/] I have added
[tests](https://www.cursorless.org/docs/contributing/test-case-recorder/)
- [/] I have updated the
[docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and
[cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet)
- [/] I have not broken the cheatsheet

---------

Co-authored-by: Phil Cohen <[email protected]>
  • Loading branch information
AndreasArvidsson and phillco authored Jan 30, 2025
1 parent a0e39b4 commit 1fde160
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/vscode-common/src/testUtil/openNewEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ export async function openNewEditor(
await editor.edit((editBuilder) => editBuilder.setEndOfLine(eol));
}

// Many times running these tests opens the sidebar, which slows performance. Close it.
vscode.commands.executeCommand("workbench.action.closeSidebar");

return editor;
}

Expand Down

0 comments on commit 1fde160

Please sign in to comment.