test: fix a possible race condition in sendInputEvent test (#15530)

This commit is contained in:
Jeremy Apthorp 2018-11-01 10:25:46 -07:00 committed by GitHub
parent fe8965efa2
commit 932ffdc1e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -313,8 +313,8 @@ describe('webContents module', () => {
describe('sendInputEvent(event)', () => {
beforeEach((done) => {
w.loadFile(path.join(fixtures, 'pages', 'key-events.html'))
w.webContents.once('did-finish-load', () => done())
w.loadFile(path.join(fixtures, 'pages', 'key-events.html'))
})
it('can send keydown events', (done) => {