storybook/code/renderers/svelte/vitest.config.ts
Valentin Palkovic 2eaeb1fe71 Fix Svelte tests
2023-12-12 18:42:01 +01:00

20 lines
608 B
TypeScript

/* eslint-disable import/no-extraneous-dependencies */
import { defineConfig, mergeConfig } from 'vitest/config';
import { sep, posix } from 'path';
import { vitestCommonConfig } from '../../vitest.workspace';
export default defineConfig(
mergeConfig(vitestCommonConfig, {
test: {
environment: 'jsdom',
name: __dirname.split(sep).slice(-2).join(posix.sep),
},
plugins: [
// eslint-disable-next-line import/no-unresolved
import('@sveltejs/vite-plugin-svelte').then(({ svelte, vitePreprocess }) =>
svelte({ preprocess: vitePreprocess() })
),
],
})
);