diff --git a/playwright/index.test.ts b/playwright/index.test.ts index b8e9357e6..50958b07d 100644 --- a/playwright/index.test.ts +++ b/playwright/index.test.ts @@ -1,3 +1,5 @@ +import process from "process"; + import type { ElectronApplication, Page } from "@playwright/test"; import { test, expect } from "@playwright/test"; import { _electron as electron } from "playwright"; @@ -7,7 +9,13 @@ let page: Page; test.beforeAll(async () => { // Use package.main - electronApp = await electron.launch({ args: ["."] }); + electronApp = await electron.launch({ + args: ["."], + env: { + ...process.env, + NODE_ENV: "development", + }, + }); const isPackaged = await electronApp.evaluate(async ({ app }) => app.isPackaged); expect(isPackaged).toBe(false);