-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.js
More file actions
59 lines (58 loc) · 1.93 KB
/
vitest.config.js
File metadata and controls
59 lines (58 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import { defineVitestConfig } from '@nuxt/test-utils/config'
// https://vitejs.dev/config/
export default defineVitestConfig({
plugins: [],
root: './',
test: {
include: ['tests/unit/**/*.{test,spec}.?(c|m)[jt]s?(x)'],
globals: true,
environment: 'nuxt',
setupFiles: [
'./.vitest/setup.ts',
'./.vitest/setupVitest.js',
'./.vitest/setEnvVars.js',
// './.vitest/register-context.ts',
'./.vitest/mockApiCookie.ts',
'./.vitest/mockOauth.ts',
'./.vitest/mockMixpanel.ts',
'./.vitest/mockPatatoids.ts',
],
environmentOptions: {
nuxt: {
// rootDir: fileURLToPath(new URL('./playground', import.meta.url)),
domEnvironment: 'happy-dom', // 'happy-dom' (default) or 'jsdom'
overrides: {
// other Nuxt config you want to pass
runtimeConfig: {
public: {
appVersion: '',
appApiOrgCode: '',
appCaptchaKey: '',
appMixpanelApiUrl: '',
appMixpanelProjectToken: '',
appPublicBinariesPrefix: 'http://localhost:8080',
appMaxSizeFile: 5_000_000,
appProfileExempleResearcherSlugOrId: '',
appProfileExempleProfessionalSlugOrId: '',
appProfileExempleStudentSlugOrId: '',
appKeycloakUrl: 'http://localhost:8080/auth',
appKeycloakClientId: '12346',
appKeycloakClientSecret: 'abcd',
appKeycloakRealm: 'foobar',
appApiUrl: '',
appApiDefaultVersion: '',
appMetaPortalUrl: '',
appWssHost: 'http://localhost:8080/',
appEnvironment: '',
appDoc: 'http://localhost:8080/',
appI18nFallbackLocale: '',
appI18nLocale: 'en',
appShowDebug: 0,
appDisconnectionGraceDuration: 0,
},
},
},
},
},
},
})