1
- import * as http from 'http'
2
- import path , { dirname , resolve } from 'path'
3
- import os from 'os'
1
+ import * as http from 'node: http'
2
+ import path , { dirname , join , resolve } from 'node: path'
3
+ import os from 'node: os'
4
4
import sirv from 'sirv'
5
5
import fs from 'fs-extra'
6
6
import { chromium } from 'playwright-chromium'
@@ -19,7 +19,7 @@ import { beforeAll } from 'vitest'
19
19
20
20
// #region env
21
21
22
- export const workspaceRoot = path . resolve ( __dirname , '../' )
22
+ export const workspaceRoot = resolve ( __dirname , '../' )
23
23
24
24
export const isBuild = ! ! process . env . VITE_TEST_BUILD
25
25
export const isServe = ! isBuild
@@ -84,7 +84,7 @@ export function setViteUrl(url: string): void {
84
84
85
85
// #endregion
86
86
87
- const DIR = path . join ( os . tmpdir ( ) , 'vitest_playwright_global_setup' )
87
+ const DIR = join ( os . tmpdir ( ) , 'vitest_playwright_global_setup' )
88
88
89
89
beforeAll ( async ( s ) => {
90
90
const suite = s as File
@@ -93,7 +93,7 @@ beforeAll(async (s) => {
93
93
return
94
94
}
95
95
96
- const wsEndpoint = fs . readFileSync ( path . join ( DIR , 'wsEndpoint' ) , 'utf-8' )
96
+ const wsEndpoint = fs . readFileSync ( join ( DIR , 'wsEndpoint' ) , 'utf-8' )
97
97
if ( ! wsEndpoint ) {
98
98
throw new Error ( 'wsEndpoint not found' )
99
99
}
0 commit comments