zustand/vitest.config.mts
Marcin Kulpa 90f45eb076
Chore/enhance prettier config (#3022)
* chore: enhance prettier config

* chore: fix prettier issues

* Update package.json

---------

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2025-02-20 10:28:40 +09:00

31 lines
863 B
TypeScript

import { resolve } from 'path'
// eslint-disable-next-line import/extensions
import { defineConfig } from 'vitest/config'
export default defineConfig({
resolve: {
alias: [
{ find: /^zustand$/, replacement: resolve('./src/index.ts') },
{ find: /^zustand(.*)$/, replacement: resolve('./src/$1.ts') },
],
},
test: {
name: 'zustand',
// Keeping globals to true triggers React Testing Library's auto cleanup
// https://vitest.dev/guide/migration.html
globals: true,
environment: 'jsdom',
dir: 'tests',
reporters: process.env.GITHUB_ACTIONS
? ['default', 'github-actions']
: ['default'],
setupFiles: ['tests/setup.ts'],
coverage: {
include: ['src/**/'],
reporter: ['text', 'json', 'html', 'text-summary'],
reportsDirectory: './coverage/',
provider: 'v8',
},
},
})