Skip to content

Commit

Permalink
test: adjust playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelass committed Feb 21, 2024
1 parent 612a1e2 commit f75f768
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion playwright/index.test.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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);
Expand Down

0 comments on commit f75f768

Please sign in to comment.