From f75f7684b1bc08f172479287dae5f63830c9da85 Mon Sep 17 00:00:00 2001 From: pixelass Date: Wed, 21 Feb 2024 22:29:51 +0100 Subject: [PATCH] test: adjust playwright see https://github.com/microsoft/playwright/issues/11932#issuecomment-1200164702 --- playwright/index.test.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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);