Close windows instead of destroying them

This commit is contained in:
Kevin Sawicki 2016-08-03 12:47:53 -07:00
parent cce6be1900
commit 0ebe142b2f
10 changed files with 45 additions and 62 deletions

View file

@ -5,6 +5,7 @@ const fs = require('fs')
const path = require('path')
const os = require('os')
const http = require('http')
const {closeWindow} = require('./window-helpers')
const remote = require('electron').remote
const screen = require('electron').screen
@ -38,9 +39,6 @@ describe('browser-window module', function () {
})
beforeEach(function () {
if (w != null) {
w.destroy()
}
w = new BrowserWindow({
show: false,
width: 400,
@ -52,10 +50,7 @@ describe('browser-window module', function () {
})
afterEach(function () {
if (w != null) {
w.destroy()
}
w = null
return closeWindow(w).then(function () { w = null })
})
describe('BrowserWindow.close()', function () {