-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvitest.integration.config.ts
More file actions
31 lines (30 loc) · 994 Bytes
/
vitest.integration.config.ts
File metadata and controls
31 lines (30 loc) · 994 Bytes
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
/// <reference types="vitest/config" />
import path from 'node:path'
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
environment: 'jsdom',
// No global setup that mocks modules — integration uses real modules
globals: true,
// Anvil can't properly isolate nonces when test files run in parallel with same account
// Keep sequential execution to avoid nonce conflicts and state interference
fileParallelism: false,
include: [
'tests/integration/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
],
exclude: ['tests/e2e/**/*', 'node_modules/**/*', 'src/**/*.stories.{js,jsx,ts,tsx}'],
testTimeout: 120_000,
hookTimeout: 60_000,
isolate: true,
environmentOptions: {
jsdom: { resources: 'usable' },
},
mockReset: true,
clearMocks: true,
restoreMocks: true,
},
resolve: {
alias: { '@': path.resolve(__dirname, './src') },
},
})