1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-12-22 17:23:50 +01:00
blog/test/vitest.config.ts
Matthias Kretschmann 05ad0470c2
migrate to biome (#944)
* migrate to biome

* cleanup

* fix

* use tsx

* script tweaks

* fix test runs

* path tweaks
2024-07-27 21:15:05 +01:00

41 lines
889 B
TypeScript

/// <reference types="vitest" />
import { getViteConfig } from 'astro/config'
import tsconfigPaths from 'vite-tsconfig-paths'
export default getViteConfig({
plugins: [tsconfigPaths()],
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./test/vitest.setup.ts'],
include: [
'./src/**/*.test.?(c|m)[jt]s?(x)',
'./scripts/**/*.test.?(c|m)[jt]s?(x)'
],
deps: {
moduleDirectories: [
'node_modules',
'./test/__mocks__',
'./src/images/components/react'
]
},
coverage: {
all: true,
exclude: [
'**/*.d.ts',
'**/types.ts',
'**/*.test.ts',
'**/*.spec.ts',
'**/test/**/*',
'**/.config',
'src/images/components',
'src/pages',
'**/content',
'public',
'**/tmp/**/*',
'**/dist/**/*'
]
}
}
})