Skip to content

Commit e171233

Browse files
committed
hard coded delay
1 parent 36bc9d8 commit e171233

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

plugins/css-has-pseudo/test/_browser-stylesheet-loading.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161

6262
link.type = "text/css";
6363
link.rel = "stylesheet";
64-
link.href = "http://localhost:8081/test/browser-stylesheet-loading.expect.css?delay=50";
64+
link.href = "http://localhost:8081/test/browser-stylesheet-loading.expect.css?delay";
6565
link.crossOrigin = "anonymous";
6666

6767
const loadWaiter = new Promise((resolve) => {

plugins/css-has-pseudo/test/_browser.mjs

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ const requestListener = async function (req, res) {
3535
res.end(await fs.readFile('test/browser.expect.css', 'utf8'));
3636
break;
3737
case '/test/browser-stylesheet-loading.expect.css':
38-
await new Promise(resolve => setTimeout(resolve, Math.min(parseInt(parsedUrl.searchParams.get('delay') ?? '0', 10), 1000)));
38+
if (parsedUrl.searchParams.has('delay')) {
39+
await new Promise(resolve => setTimeout(resolve, 50));
40+
}
3941

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

0 commit comments

Comments
 (0)