test: narrow scope of afterEach in remote to tests that need it (#18447)

This commit is contained in:
Jeremy Apthorp 2019-05-28 14:07:48 -07:00 коммит произвёл GitHub
Родитель 96b32a814c
Коммит 0e2dedaf4e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -23,10 +23,6 @@ const comparePaths = (path1, path2) => {
describe('remote module', () => {
const fixtures = path.join(__dirname, 'fixtures')
let w = null
afterEach(() => closeWindow(w).then(() => { w = null }))
describe('remote.getGlobal filtering', () => {
it('can return custom values', () => {
ipcRenderer.send('handle-next-remote-get-global', { test: 'Hello World!' })
@ -552,6 +548,9 @@ describe('remote module', () => {
})
describe('remote function in renderer', () => {
let w = null
afterEach(() => closeWindow(w).then(() => { w = null }))
afterEach(() => {
ipcMain.removeAllListeners('done')
})