diff --git a/templates/ts-playwright-test-runner/tests/first.spec.ts b/templates/ts-playwright-test-runner/tests/first.spec.ts index eaa57f10..1e0960ce 100644 --- a/templates/ts-playwright-test-runner/tests/first.spec.ts +++ b/templates/ts-playwright-test-runner/tests/first.spec.ts @@ -4,7 +4,11 @@ test('has appropriate size', async ({ page }) => { let totalDownloaded = 0; await page.on('response', async (r) => { - totalDownloaded += await (await r.body()).byteLength; + r.body().then((b) => { + totalDownloaded += b.byteLength; + }).catch(() => { + // Ignore errors. + }); }); await page.goto('https://apify.com/about', { waitUntil: 'networkidle' });