Skip to content

Commit

Permalink
test: move NODE_ENV assignment to vitest config
Browse files Browse the repository at this point in the history
  • Loading branch information
haoqunjiang committed Feb 1, 2024
1 parent 6a00923 commit c0db222
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions playground/vitestGlobalSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ const DIR = path.join(os.tmpdir(), 'vitest_playwright_global_setup')
let browserServer: BrowserServer | undefined

export async function setup(): Promise<void> {
process.env.NODE_ENV = process.env.VITE_TEST_BUILD
? 'production'
: 'development'

browserServer = await chromium.launchServer({
headless: !process.env.VITE_DEBUG_SERVE,
args: process.env.CI
Expand Down
4 changes: 4 additions & 0 deletions vitest.config.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import { defineConfig } from 'vitest/config'

const timeout = process.env.CI ? 50000 : 30000

process.env.NODE_ENV = process.env.VITE_TEST_BUILD
? 'production'
: 'development'

export default defineConfig({
resolve: {
alias: {
Expand Down

0 comments on commit c0db222

Please sign in to comment.