fork of hey-api/openapi-ts because I need some additional things
1import { fileURLToPath } from 'node:url';
2
3import { createVitestConfig } from '@config/vite-base';
4import { defineVitestConfig } from '@nuxt/test-utils/config';
5
6// Create a base configuration with any shared settings
7const baseConfig = createVitestConfig(
8 fileURLToPath(new URL('./', import.meta.url)),
9 {
10 test: {
11 coverage: {
12 exclude: ['dist', 'src/**/*.d.ts'],
13 include: ['src/**/*.ts'],
14 provider: 'v8',
15 },
16 },
17 },
18);
19
20// Use Nuxt's config with our common test settings
21export default defineVitestConfig({
22 ...baseConfig,
23 test: {
24 ...baseConfig.test,
25 environment: 'nuxt',
26 environmentOptions: {
27 nuxt: {
28 domEnvironment: 'jsdom',
29 },
30 },
31 },
32});