Skip to content

Commit

Permalink
limit delay
Browse files Browse the repository at this point in the history
  • Loading branch information
romainmenke committed Dec 16, 2024
1 parent 4c40f7b commit 36bc9d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/css-has-pseudo/test/_browser.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const requestListener = async function (req, res) {
res.end(await fs.readFile('test/browser.expect.css', 'utf8'));
break;
case '/test/browser-stylesheet-loading.expect.css':
await new Promise(resolve => setTimeout(resolve, parseInt(parsedUrl.searchParams.get('delay') ?? '0', 10)));
await new Promise(resolve => setTimeout(resolve, Math.min(parseInt(parsedUrl.searchParams.get('delay') ?? '0', 10), 1000)));

// Stylesheet WITH CORS headers
res.setHeader('Content-type', 'text/css');
Expand Down

0 comments on commit 36bc9d8

Please sign in to comment.