diff --git a/spec/webview-spec.js b/spec/webview-spec.js index 703bb26d0551..c3acbb61295d 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -917,11 +917,12 @@ describe(' tag', function () { describe('.clearHistory()', () => { it('should clear the navigation history', async () => { - loadWebView(webview, { + const message = waitForEvent(webview, 'ipc-message') + await loadWebView(webview, { nodeintegration: 'on', src: `file://${fixtures}/pages/history.html` }) - const event = await waitForEvent(webview, 'ipc-message') + const event = await message expect(event.channel).to.equal('history') expect(event.args[0]).to.equal(2)