Browse Source

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

Jeremy Apthorp 6 years ago
parent
commit
932ffdc1e1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      spec/api-web-contents-spec.js

+ 1 - 1
spec/api-web-contents-spec.js

@@ -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) => {