Reuse window variable and only close from root afterEach
This commit is contained in:
parent
d7e7c2b17f
commit
fee7683b86
1 changed files with 1 additions and 6 deletions
|
@ -236,9 +236,8 @@ describe('session module', function () {
|
|||
})
|
||||
|
||||
describe('will-download event', function () {
|
||||
var w = null
|
||||
|
||||
beforeEach(function () {
|
||||
if (w != null) w.destroy()
|
||||
w = new BrowserWindow({
|
||||
show: false,
|
||||
width: 400,
|
||||
|
@ -246,10 +245,6 @@ describe('session module', function () {
|
|||
})
|
||||
})
|
||||
|
||||
afterEach(function () {
|
||||
return closeWindow(w).then(function () { w = null })
|
||||
})
|
||||
|
||||
it('can cancel default download behavior', function (done) {
|
||||
const mockFile = new Buffer(1024)
|
||||
const contentDisposition = 'inline; filename="mockFile.txt"'
|
||||
|
|
Loading…
Reference in a new issue