mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-10-01 15:48:23 -05:00
Move app to apps/web-react in pnpm workspace layout
This commit is contained in:
7
apps/web-react/app/utils/e2e.ts
Normal file
7
apps/web-react/app/utils/e2e.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
// import.meta.env is undefined when Playwright bundles test code, so we need to
|
||||
// check if it exists before accessing it. There the flag comes from process.env
|
||||
// instead (set by playwright.config.ts), as app modules run in the test process too.
|
||||
export const IS_E2E_TEST_RUN =
|
||||
(typeof import.meta.env !== "undefined" &&
|
||||
import.meta.env.VITE_E2E_TEST_RUN === "true") ||
|
||||
(typeof process !== "undefined" && process.env.VITE_E2E_TEST_RUN === "true");
|
||||
Reference in New Issue
Block a user