From 19a5d2ba2bc9886557098932ba9970bae0d74e02 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 3 Nov 2016 16:43:16 -0700 Subject: [PATCH] Use window close helper instead of destroying for coverage --- spec/webview-spec.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spec/webview-spec.js b/spec/webview-spec.js index 2c0b8098ce..4fb9694b1b 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -3,6 +3,7 @@ const path = require('path') const http = require('http') const url = require('url') const {app, session, getGuestWebContents, ipcMain, BrowserWindow} = require('electron').remote +const {closeWindow} = require('./window-helpers') describe(' tag', function () { this.timeout(20000) @@ -21,10 +22,7 @@ describe(' tag', function () { document.body.appendChild(webview) } webview.remove() - if (w) { - w.destroy() - w = null - } + return closeWindow(w).then(function () { w = null }) }) it('works without script tag in page', function (done) {