Skip to content

Commit f310a05

Browse files
feat(e2e): allow overwriting env variables in setup (#903)
1 parent 9aa42c7 commit f310a05

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/core/setup/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function createTest(options: Partial<TestOptions>): TestHooks {
5050
}
5151

5252
if (ctx.options.server) {
53-
await startServer()
53+
await startServer(ctx.options.env)
5454
}
5555

5656
if (ctx.options.waitFor) {

src/core/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { Nuxt, NuxtConfig } from '@nuxt/schema'
22
import type { ExecaChildProcess } from 'execa'
33
import type { Browser, LaunchOptions } from 'playwright-core'
4+
import type { StartServerOptions } from './server'
45

56
export type TestRunner = 'vitest' | 'jest' | 'cucumber'
67

@@ -24,6 +25,7 @@ export interface TestOptions {
2425
}
2526
server: boolean
2627
port?: number
28+
env?: StartServerOptions['env']
2729
}
2830

2931
export interface TestContext {

0 commit comments

Comments
 (0)