@@ -3,8 +3,7 @@ import { join } from 'node:path';
3
3
import { StaticPageAgent } from '@/playground/agent' ;
4
4
import PlaygroundServer from '@/playground/server' ;
5
5
import StaticPage from '@/playground/static-page' ;
6
- import { allConfigFromEnv } from '@midscene/shared/env' ;
7
- import { afterEach , beforeEach , describe , expect , it , vi } from 'vitest' ;
6
+ import { afterEach , describe , expect , it , vi } from 'vitest' ;
8
7
9
8
const dumpFilePath = join ( __dirname , '../../fixtures/ui-context.json' ) ;
10
9
const context = readFileSync ( dumpFilePath , { encoding : 'utf-8' } ) ;
@@ -34,17 +33,8 @@ describe(
34
33
} ) ;
35
34
36
35
it ( 'server should work' , async ( ) => {
37
- // Save current config before creating server
38
- const currentConfig = ( globalThis as any ) . midsceneGlobalConfig ;
39
-
40
36
server = new PlaygroundServer ( StaticPage , StaticPageAgent ) ;
41
37
42
- // Restore config after server creation in case it was cleared
43
- if ( ! ( globalThis as any ) . midsceneGlobalConfig ||
44
- Object . keys ( ( globalThis as any ) . midsceneGlobalConfig || { } ) . length === 0 ) {
45
- ( globalThis as any ) . midsceneGlobalConfig = currentConfig || allConfigFromEnv ( ) ;
46
- }
47
-
48
38
await server . launch ( ) ;
49
39
50
40
const port = server . port ;
0 commit comments