You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/vitest.config.js

29 lines
626 B

import { configDefaults, defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [
{
name: 'resolve-svelte',
resolveId(id) {
if (id === 'svelte/compiler') {
return `${__dirname}/src/compiler/index.js`;
}
if (id === 'svelte') {
return `${__dirname}/src/runtime/index.js`;
}
if (id.startsWith('svelte/')) {
return id.replace(/^svelte(.*)\/?$/, `${__dirname}/src/runtime/$1/index.js`);
}
}
}
],
test: {
dir: 'test',
reporters: ['dot'],
exclude: [...configDefaults.exclude, '**/samples/**'],
globalSetup: './test/vitest-global-setup.js'
}
});