mirror of
https://github.com/electron/electron.git
synced 2026-01-26 15:58:07 -05:00
Reuse window variable and only close from root afterEach
This commit is contained in:
@@ -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"'
|
||||
|
||||
Reference in New Issue
Block a user