Skip to content

Commit

Permalink
test: fix race condition in debugger spec (#17091)
Browse files Browse the repository at this point in the history
  • Loading branch information
nornagon committed Feb 23, 2019
1 parent 5be9356 commit 28b150f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/api-debugger-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ describe('debugger module', () => {
w.webContents.loadURL('about:blank')
w.webContents.debugger.attach()

const opened = emittedOnce(w.webContents, 'devtools-opened')
w.webContents.openDevTools()
await emittedOnce(w.webContents, 'devtools-opened')
await opened

const params = { 'expression': '4+2' }
const res = await w.webContents.debugger.sendCommand('Runtime.evaluate', params)
Expand Down

0 comments on commit 28b150f

Please sign in to comment.