From 6b657259a536ff340f5364adaa2dbd67c907ab00 Mon Sep 17 00:00:00 2001 From: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com> Date: Fri, 13 Nov 2020 11:16:14 -0800 Subject: [PATCH] Ensure that we close editors before utils tests (#13391) --- extensions/notebook/src/book/bookTreeView.ts | 2 +- .../notebook/src/test/common/notebookUtils.test.ts | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/extensions/notebook/src/book/bookTreeView.ts b/extensions/notebook/src/book/bookTreeView.ts index f3d9eb85a8..0416a63109 100644 --- a/extensions/notebook/src/book/bookTreeView.ts +++ b/extensions/notebook/src/book/bookTreeView.ts @@ -328,7 +328,7 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider { + await vscode.commands.executeCommand('workbench.action.closeAllEditors'); + }); + this.afterAll(async function (): Promise { await vscode.commands.executeCommand('workbench.action.closeAllEditors'); }); @@ -109,7 +113,7 @@ describe('notebookUtils Tests', function (): void { sinon.replaceGetter(azdata.nb, 'activeNotebookEditor', () => undefined); await notebookUtils.clearActiveCellOutput(); should(showErrorMessageSpy.calledOnce).be.true('showErrorMessage should be called exactly once'); -}); + }); it('does not show error when notebook visible', async function (): Promise { let mockNotebookEditor = TypeMoq.Mock.ofType();