mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
* update vitest * use resolve * patch for older ts * for older ts * hack with any * for other builds * wip: for umd * Revert "wip: for umd" This reverts commit a5c0d6beaa80cbbdcad7961b77d593effd6a83c8. * wip: esm * wip: system * Revert "wip: system" This reverts commit aa919631a94a5b321fa9f2ec6c26b826c37ca3b0. * wip: umd * wip: hack cjs * system cannot be tested
26 lines
700 B
TypeScript
26 lines
700 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: 'basic',
|
|
coverage: {
|
|
reporter: ['text', 'json', 'html', 'text-summary'],
|
|
reportsDirectory: './coverage/',
|
|
},
|
|
},
|
|
})
|