-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathvitest-e2e.config.ts
More file actions
25 lines (24 loc) · 891 Bytes
/
vitest-e2e.config.ts
File metadata and controls
25 lines (24 loc) · 891 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
import { defineConfig } from 'vitest/config'
import { addTestCasesMetadataList } from './test-cases/vite-plugins'
import { getCurrentEnvironment } from './e2e-test-utils/environments/environments'
import { join, dirname, basename } from 'path'
export default defineConfig(() => {
const currentEnvironment = getCurrentEnvironment();
return {
test: {
include: ['e2e/tests/**/*.spec.ts'],
globalSetup: ["e2e/setup/index.ts"],
setupFiles: ["e2e/tests/test-page/setup.ts"],
hookTimeout: 120000,
testTimeout: 120000,
reporters: ['dot'],
resolveSnapshotPath(path: string, extension: string): string {
return join(dirname(path), '__snapshots__', currentEnvironment.id, `${basename(path)}${extension}`)
},
env: {
SNAPSHOT_ENVIRONMENT: currentEnvironment.id
}
},
plugins: [addTestCasesMetadataList()],
}
})