From 217848ca52864b6ad4556d18ba011d041534df01 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 29 Nov 2016 10:56:17 -0800 Subject: [PATCH] Assert windows are not leaking across tests --- spec/api-browser-window-spec.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/api-browser-window-spec.js b/spec/api-browser-window-spec.js index 08f5ce94912e..3c498410c7f3 100644 --- a/spec/api-browser-window-spec.js +++ b/spec/api-browser-window-spec.js @@ -82,7 +82,10 @@ describe('browser-window module', function () { }) afterEach(function () { - return closeWindow(w).then(function () { w = null }) + return closeWindow(w).then(function () { + w = null + assert.equal(BrowserWindow.getAllWindows().length, 1) + }) }) describe('BrowserWindow.close()', function () {