From 19e4ace972a5a4dfa54ab17377dbbdab13fd193e Mon Sep 17 00:00:00 2001 From: Rene Haas Date: Fri, 19 Aug 2022 10:26:22 +0200 Subject: [PATCH] fix async --- local/playwright-tooling/src/expectSuccess.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/local/playwright-tooling/src/expectSuccess.js b/local/playwright-tooling/src/expectSuccess.js index ea2d172..8e12dcd 100644 --- a/local/playwright-tooling/src/expectSuccess.js +++ b/local/playwright-tooling/src/expectSuccess.js @@ -2,15 +2,14 @@ const { expect } = require('@playwright/test'); const startSelector = '#start'; const resultSelector = '#testResult'; -const logError = (page, msg) => { +const logError = async (page, msg) => { const title = await page.title(); // eslint-disable-next-line no-console console.error(title, msg); -} +}; // default timeout = // 10mins module.exports = async (page, timeout = 10 * 60 * 2000) => { - page.on('pageerror', (err) => { logError(page, err.message); });