added frontend test environment

This commit is contained in:
2026-03-26 21:13:04 +01:00
parent 9228e335e4
commit f7cf4360c0
5 changed files with 1295 additions and 3 deletions
+18
View File
@@ -0,0 +1,18 @@
import { defineConfig } from 'vitest/config'
import { loadEnv } from 'vite'
export default defineConfig(({mode}) => {
const env = loadEnv(mode, process.cwd(), '')
return {
server: {
port: 51204,
host: '0.0.0.0',
allowedHosts: env.VITEST_PUBLIC_URL ? [env.VITEST_PUBLIC_URL] : [],
},
test: {
environment: 'jsdom',
env: loadEnv(mode, process.cwd(), '')
}
}
});