File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
packages/preview2-shim/test Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 33} from "node:assert" ;
44import { fileURLToPath } from "node:url" ;
55
6- import { suite , test , assert } from "vitest" ;
6+ import { suite , test , assert , vi } from "vitest" ;
77
88const symbolDispose = Symbol . dispose || Symbol . for ( "dispose" ) ;
99
@@ -349,9 +349,17 @@ suite("Node.js Preview2", () => {
349349 } ,
350350 } ) ;
351351
352- assert . ok ( ! pollable . ready ( ) ) ;
352+ await vi . waitUntil (
353+ ( ) => ! pollable . ready ( ) ,
354+ { timeout : 5_000 , interval : 100 , } ,
355+ ) ;
356+
353357 pollable . block ( ) ;
354- assert . ok ( pollable . ready ( ) ) ;
358+
359+ await vi . waitUntil (
360+ ( ) => pollable . ready ( ) ,
361+ { timeout : 5_000 , interval : 100 , } ,
362+ ) ;
355363
356364 const [ input , output ] = tcpSocket . finishConnect ( ) ;
357365
You can’t perform that action at this time.
0 commit comments