From f931578b6f63306ffa1361371b181d4749d219d5 Mon Sep 17 00:00:00 2001 From: Drew Daniels Date: Sun, 4 Aug 2024 20:23:30 -0500 Subject: [PATCH] env vars for testing --- apps/iframe-react-app/vite.config.ts | 5 ++++- apps/parent-react-app/vite.config.ts | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/iframe-react-app/vite.config.ts b/apps/iframe-react-app/vite.config.ts index 9c24940..d12dd87 100644 --- a/apps/iframe-react-app/vite.config.ts +++ b/apps/iframe-react-app/vite.config.ts @@ -7,6 +7,9 @@ export default defineConfig({ watch: false, globals: true, environment: 'jsdom', + env: { + VITE_PARENT_WINDOW_URL: 'http://localhost:4200', + }, include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], reporters: ['default'], @@ -19,7 +22,7 @@ export default defineConfig({ cacheDir: '../../node_modules/.vite/apps/iframe-react-app', server: { - port: 4200, + port: 4201, host: 'localhost', }, diff --git a/apps/parent-react-app/vite.config.ts b/apps/parent-react-app/vite.config.ts index 9aa3b12..930a4ba 100644 --- a/apps/parent-react-app/vite.config.ts +++ b/apps/parent-react-app/vite.config.ts @@ -7,6 +7,9 @@ export default defineConfig({ watch: false, globals: true, environment: 'jsdom', + env: { + VITE_IFRAME_URL: 'http://localhost:4201', + }, include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], reporters: ['default'],