mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
docs: update vitest config to match vitest docs (#3037)
* Update testing.md in vite, mergeConfig accepts only config in object form. If you have a config in callback form, you should call it before passing into mergeConfig. You can use the defineConfig helper to merge a config in callback form with another config: https://vite.dev/guide/api-javascript.html#mergeconfig * Fix formatting --------- Co-authored-by: Danilo Britto <dbritto.dev@gmail.com>
This commit is contained in:
parent
979ce7de92
commit
a90981afb5
@ -274,8 +274,9 @@ vi.mock('zustand') // to make it work like Jest (auto-mocking)
|
||||
import { defineConfig, mergeConfig } from 'vitest/config'
|
||||
import viteConfig from './vite.config'
|
||||
|
||||
export default mergeConfig(
|
||||
viteConfig,
|
||||
export default defineConfig((configEnv) =>
|
||||
mergeConfig(
|
||||
viteConfig(configEnv),
|
||||
defineConfig({
|
||||
test: {
|
||||
globals: true,
|
||||
@ -283,6 +284,7 @@ export default mergeConfig(
|
||||
setupFiles: ['./setup-vitest.ts'],
|
||||
},
|
||||
}),
|
||||
),
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user