You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Really appreciate the script, works well so far, except that it appears all tests must be async. I used a (nearly) empty QUnit html harness (just the required scripts/elements) and a single test (see below). The harness times out with a synchronous test, but works as expected with an async test. Any ideas why or how to fix? If not, it would be good to document this restriction in the readme.
As a side note, the [object Object] output is because the console passthrough is receiving an object, not text. The fix is easy, I'll submit a PR, but essentially change the console attachment to:
await page.on('console', (...params) => {
for (let i = 0; i < params.length; ++i) {
console.log(`${(typeof(params[i]) === 'object') ? params[i]._text : params[i]}`);
}
});
The [object Object] output in the successful, async test using this new format results in: Running: {}
The text was updated successfully, but these errors were encountered:
Hi! Really appreciate the script, works well so far, except that it appears all tests must be async. I used a (nearly) empty QUnit html harness (just the required scripts/elements) and a single test (see below). The harness times out with a synchronous test, but works as expected with an async test. Any ideas why or how to fix? If not, it would be good to document this restriction in the readme.
Synchronous Test file:
Output:
Asynchronous test file:
Output:
qunit-puppeteer version: 1.0.1
Node version: 8.9.4
QUnit version: 2.5.0
As a side note, the
[object Object]
output is because the console passthrough is receiving an object, not text. The fix is easy, I'll submit a PR, but essentially change the console attachment to:The
[object Object]
output in the successful, async test using this new format results in:Running: {}
The text was updated successfully, but these errors were encountered: