adjust timeout yet again

pull/8577/head
gtmnayan 3 years ago
parent 449d6a7ef6
commit 5c8d87e49a

@ -9,6 +9,8 @@ import { loadConfig, loadSvelte } from '../helpers';
const assert = fs.readFileSync(`${__dirname}/assert.js`, 'utf-8'); const assert = fs.readFileSync(`${__dirname}/assert.js`, 'utf-8');
describe('custom-elements', function () { describe('custom-elements', function () {
this.timeout(20000);
let svelte; let svelte;
/** @type {import('@playwright/test').Browser} */ /** @type {import('@playwright/test').Browser} */
let browser; let browser;
@ -24,8 +26,6 @@ describe('custom-elements', function () {
if (browser) await browser.close(); if (browser) await browser.close();
}); });
let first_run = true;
fs.readdirSync(`${__dirname}/samples`).forEach((dir) => { fs.readdirSync(`${__dirname}/samples`).forEach((dir) => {
if (dir[0] === '.') return; if (dir[0] === '.') return;
@ -103,6 +103,6 @@ describe('custom-elements', function () {
if (test_result) console.log(test_result); if (test_result) console.log(test_result);
assertWarnings(); assertWarnings();
page.close(); page.close();
}).timeout(first_run ? 20000 : 10000); });
}); });
}); });

@ -13,7 +13,7 @@ const index = path.resolve('index.mjs');
const assert = fs.readFileSync(`${__dirname}/assert.js`, 'utf-8'); const assert = fs.readFileSync(`${__dirname}/assert.js`, 'utf-8');
describe('runtime (playwright)', function () { describe('runtime (playwright)', function () {
this.timeout(10000); this.timeout(20000);
let svelte; let svelte;
let browser; let browser;
@ -48,7 +48,6 @@ describe('runtime (playwright)', function () {
(skip ? it.skip : solo ? it.only : it)( (skip ? it.skip : solo ? it.only : it)(
`${dir} ${hydrate ? '(with hydration)' : ''}`, `${dir} ${hydrate ? '(with hydration)' : ''}`,
async () => { async () => {
first_run = false;
if (failed.has(dir)) { if (failed.has(dir)) {
// this makes debugging easier, by only printing compiled output once // this makes debugging easier, by only printing compiled output once
throw new Error('skipping test, already failed'); throw new Error('skipping test, already failed');
@ -221,10 +220,9 @@ describe('runtime (playwright)', function () {
throw err; throw err;
} }
} }
).timeout(first_run ? 20000 : 10000); );
} }
let first_run = true;
fs.readdirSync(`${__dirname}/samples`).forEach((dir) => { fs.readdirSync(`${__dirname}/samples`).forEach((dir) => {
runTest(dir, false); runTest(dir, false);
runTest(dir, true); runTest(dir, true);

Loading…
Cancel
Save