added frontend test environment
This commit is contained in:
@@ -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(), '')
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user