vitest.config.mts
This file
Path
vitest.config.mts
29 lines · 817 bytes · TypeScript
Last changed by
chore(eslint): enforce file extension usage for internal modules, ignore external packages (#3116)Wonsuk Choibefore adoption028909e
History of this fileTake it
The walk stopped after 200 commits: lines older than f85898f point at it.
chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)Wonsuk Choibefore adoptionf85898f
lines 1–29why, one step back1import { resolve } from 'path'2import { defineConfig } from 'vitest/config'34export default defineConfig({5 resolve: {6 alias: [7 { find: /^zustand$/, replacement: resolve('./src/index.ts') },8 { find: /^zustand(.*)$/, replacement: resolve('./src/$1.ts') },9 ],10 },11 test: {12 name: 'zustand',13 // Keeping globals to true triggers React Testing Library's auto cleanup14 // https://vitest.dev/guide/migration.html15 globals: true,16 environment: 'jsdom',17 dir: 'tests',18 reporters: process.env.GITHUB_ACTIONS19 ? ['default', 'github-actions']20 : ['default'],21 setupFiles: ['tests/setup.ts'],22 coverage: {23 include: ['src/**/'],24 reporter: ['text', 'json', 'html', 'text-summary'],25 reportsDirectory: './coverage/',26 provider: 'v8',27 },28 },29})