Use window close helper instead of destroying for coverage
This commit is contained in:
parent
16f57b219b
commit
19a5d2ba2b
1 changed files with 2 additions and 4 deletions
|
@ -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('<webview> tag', function () {
|
||||
this.timeout(20000)
|
||||
|
@ -21,10 +22,7 @@ describe('<webview> 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) {
|
||||
|
|
Loading…
Reference in a new issue