-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.integration.config.ts
More file actions
40 lines (37 loc) · 1.36 KB
/
vitest.integration.config.ts
File metadata and controls
40 lines (37 loc) · 1.36 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
import path from 'path';
import { config } from 'dotenv';
import { defineConfig } from 'vitest/config';
import { COVERAGE_EXCLUDES } from './vitest.shared';
config({ path: '.env.local' });
config();
export default defineConfig({
test: {
environment: 'node',
globals: true,
include: ['tests/integration/**/*.test.ts'],
reporters: [['default'], ['json', { outputFile: 'reports/vitest-integration.json' }]],
alias: {
'@': path.resolve(__dirname, './'),
'server-only': path.resolve(__dirname, 'node_modules/server-only/empty.js'),
},
coverage: {
provider: 'v8',
reporter: ['text', 'html', 'json'],
exclude: ['node_modules/**', '.next/**', ...COVERAGE_EXCLUDES],
},
env: {
BETTER_AUTH_SECRET: 'test-secret-at-least-32-characters-long-so-zod-passes',
BETTER_AUTH_URL: process.env.BETTER_AUTH_URL ?? 'http://localhost:3000',
DATABASE_URL:
process.env.TEST_DATABASE_URL ??
process.env.DATABASE_URL ??
'postgresql://postgres:postgres@127.0.0.1:5432/requo',
NEXT_PUBLIC_SUPABASE_URL:
process.env.NEXT_PUBLIC_SUPABASE_URL ?? 'http://localhost:54321',
NEXT_PUBLIC_SUPABASE_ANON_KEY:
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY ?? 'test-anon-key',
SUPABASE_SERVICE_ROLE_KEY:
process.env.SUPABASE_SERVICE_ROLE_KEY ?? 'test-service-key',
},
},
});