diff --git a/test/custom-elements/index.js b/test/custom-elements/index.js index c1c6d19a19..26f9ae874f 100644 --- a/test/custom-elements/index.js +++ b/test/custom-elements/index.js @@ -9,6 +9,8 @@ import { loadConfig, loadSvelte } from '../helpers'; const assert = fs.readFileSync(`${__dirname}/assert.js`, 'utf-8'); describe('custom-elements', function () { + this.timeout(20000); + let svelte; /** @type {import('@playwright/test').Browser} */ let browser; @@ -24,8 +26,6 @@ describe('custom-elements', function () { if (browser) await browser.close(); }); - let first_run = true; - fs.readdirSync(`${__dirname}/samples`).forEach((dir) => { if (dir[0] === '.') return; @@ -103,6 +103,6 @@ describe('custom-elements', function () { if (test_result) console.log(test_result); assertWarnings(); page.close(); - }).timeout(first_run ? 20000 : 10000); + }); }); }); diff --git a/test/runtime-playwright/index.js b/test/runtime-playwright/index.js index b7c758a2a9..8c88bcd844 100644 --- a/test/runtime-playwright/index.js +++ b/test/runtime-playwright/index.js @@ -13,7 +13,7 @@ const index = path.resolve('index.mjs'); const assert = fs.readFileSync(`${__dirname}/assert.js`, 'utf-8'); describe('runtime (playwright)', function () { - this.timeout(10000); + this.timeout(20000); let svelte; let browser; @@ -48,7 +48,6 @@ describe('runtime (playwright)', function () { (skip ? it.skip : solo ? it.only : it)( `${dir} ${hydrate ? '(with hydration)' : ''}`, async () => { - first_run = false; if (failed.has(dir)) { // this makes debugging easier, by only printing compiled output once throw new Error('skipping test, already failed'); @@ -221,10 +220,9 @@ describe('runtime (playwright)', function () { throw err; } } - ).timeout(first_run ? 20000 : 10000); + ); } - let first_run = true; fs.readdirSync(`${__dirname}/samples`).forEach((dir) => { runTest(dir, false); runTest(dir, true);