-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
31 lines (30 loc) · 987 Bytes
/
vitest.config.ts
File metadata and controls
31 lines (30 loc) · 987 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
import { defineConfig } from 'vitest/config'
import path from 'node:path'
export default defineConfig({
test: {
globals: true,
environment: 'node',
include: ['tests/**/*.test.ts'],
// Node 22.18.0 + tinypool currently crash when spinning worker threads.
// Force a single thread so `yarn test` stays stable until upstream fixes it.
pool: 'threads',
poolOptions: {
threads: {
singleThread: true,
},
},
coverage: {
reporter: ['text', 'lcov'],
},
},
resolve: {
alias: {
// Point tests directly at source directories during development
'next-middy': new URL('./packages/next-middy/src/', import.meta.url).pathname,
'next-middy/core': new URL('./packages/next-middy/src/core/', import.meta.url).pathname,
'next-middy/zod': new URL('./packages/next-middy/src/zod/', import.meta.url).pathname,
'tests/utils': path.resolve('./tests/utils'),
},
extensions: ['.ts', '.js'],
},
})