๐Ÿ“ฆ Kong / icons

๐Ÿ“„ vitest.config.ts ยท 29 lines
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
29import { defineConfig, mergeConfig } from 'vitest/config'
import viteConfig from './vite.config'

export default mergeConfig(viteConfig, defineConfig({
  test: {
    globals: true,
    environment: 'jsdom',
    include: ['**/*.spec.ts'],
    exclude: [
      './dist/**',
      './sandbox/**',
      'node_modules',
    ],
    deps: {
      optimizer: {
        web: {
          // https://github.com/vitest-dev/vitest/issues/4074
          exclude: ['vue'],
        },
      },
    },
    // The tests will only successfully run after the `pnpm generate` script has been run.
    // This `globalSetup` entry generates all comopnents before running the tests
    globalSetup: [
      './scripts/utilities/generate-icon-components.ts',
    ],
  },
}))