@@ -3,11 +3,7 @@ declare global {
33}
44
55let describe : Function , it : Function , assert : Function ;
6- if ( process . env . VITEST_WORKER_ID ) {
7- describe = await import ( "vitest" ) . then ( ( module ) => module . describe ) ;
8- it = await import ( "vitest" ) . then ( ( module ) => module . it ) ;
9- assert = await import ( "vitest" ) . then ( ( module ) => module . assert ) ;
10- } else if ( "Bun" in globalThis ) {
6+ if ( "Bun" in globalThis ) {
117 describe = function describe ( name : string , fn : Function ) {
128 return globalThis . Bun . jest ( caller ( ) ) . describe ( name , fn ) ;
139 } ;
@@ -32,6 +28,17 @@ if (process.env.VITEST_WORKER_ID) {
3228
3329 /** V8 CallSite (subset). */
3430 type CallSite = { getFileName : ( ) => string } ;
31+ } else if ( "Deno" in globalThis ) {
32+ const nodeTest = await import ( "node:test" ) ;
33+ const nodeAssert = await import ( "node:assert" ) ;
34+
35+ describe = nodeTest . describe ;
36+ it = nodeTest . it ;
37+ assert = nodeAssert . strict ;
38+ } else if ( process . env . VITEST_WORKER_ID ) {
39+ describe = await import ( "vitest" ) . then ( ( module ) => module . describe ) ;
40+ it = await import ( "vitest" ) . then ( ( module ) => module . it ) ;
41+ assert = await import ( "vitest" ) . then ( ( module ) => module . assert ) ;
3542} else {
3643 const nodeTest = await import ( "node:test" ) ;
3744 const nodeAssert = await import ( "node:assert" ) ;
0 commit comments