mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
* chore: enhance prettier config * chore: fix prettier issues * Update package.json --------- Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
31 lines
863 B
TypeScript
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',
|
|
},
|
|
},
|
|
})
|