mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 10:31:53 +08:00
22 lines
432 B
Plaintext
22 lines
432 B
Plaintext
```ts
|
|
// vitest.config.ts
|
|
|
|
/// <reference types="vitest" />
|
|
import { defineConfig } from 'vitest/config';
|
|
import { mergeConfig } from 'vite';
|
|
|
|
import viteConfig from './vite.config';
|
|
|
|
export default mergeConfig(
|
|
viteConfig,
|
|
defineConfig({
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
clearMocks: true,
|
|
setupFiles: './src/setupTests.ts', //👈 Our configuration file enabled here
|
|
},
|
|
}),
|
|
);
|
|
```
|