-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathvitest.config.ts
More file actions
45 lines (43 loc) · 988 Bytes
/
vitest.config.ts
File metadata and controls
45 lines (43 loc) · 988 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { config } from 'dotenv';
import { defineConfig } from 'vitest/config';
// Load environment variables from .env file if it exists
// This will not override existing environment variables
config({
path: new URL('.env', import.meta.url),
});
export default defineConfig({
test: {
globals: true,
environment: 'node',
env: {
OPENROUTER_API_KEY: process.env.OPENROUTER_API_KEY,
},
typecheck: {
enabled: true,
},
projects: [
{
extends: true,
test: {
name: 'unit',
include: [
'tests/unit/**/*.test.ts',
'tests/funcs/**/*.test.ts',
'tests/sdk/**/*.test.ts'
],
testTimeout: 10000,
hookTimeout: 10000,
},
},
{
extends: true,
test: {
name: 'e2e',
include: ['tests/e2e/**/*.test.ts'],
testTimeout: 30000,
hookTimeout: 30000,
},
},
],
},
});