Close windows instead of destroying them
This commit is contained in:
parent
cce6be1900
commit
0ebe142b2f
10 changed files with 45 additions and 62 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
const assert = require('assert')
|
||||
const path = require('path')
|
||||
const {closeWindow} = require('./window-helpers')
|
||||
|
||||
const {remote} = require('electron')
|
||||
const {BrowserWindow, webContents} = remote
|
||||
|
@ -13,9 +14,6 @@ describe('webContents module', function () {
|
|||
let w
|
||||
|
||||
beforeEach(function () {
|
||||
if (w != null) {
|
||||
w.destroy()
|
||||
}
|
||||
w = new BrowserWindow({
|
||||
show: false,
|
||||
width: 400,
|
||||
|
@ -27,10 +25,7 @@ describe('webContents module', function () {
|
|||
})
|
||||
|
||||
afterEach(function () {
|
||||
if (w != null) {
|
||||
w.destroy()
|
||||
}
|
||||
w = null
|
||||
return closeWindow(w).then(function () { w = null })
|
||||
})
|
||||
|
||||
describe('getAllWebContents() API', function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue