fix(core): vitest on windows (#6100)
This commit is contained in:
@@ -3,6 +3,7 @@ import { fileURLToPath } from 'node:url';
|
|||||||
|
|
||||||
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
|
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
|
||||||
import react from '@vitejs/plugin-react-swc';
|
import react from '@vitejs/plugin-react-swc';
|
||||||
|
import * as fg from 'fast-glob';
|
||||||
import { defineConfig } from 'vitest/config';
|
import { defineConfig } from 'vitest/config';
|
||||||
|
|
||||||
const rootDir = fileURLToPath(new URL('.', import.meta.url));
|
const rootDir = fileURLToPath(new URL('.', import.meta.url));
|
||||||
@@ -26,10 +27,9 @@ export default defineConfig({
|
|||||||
resolve(rootDir, './scripts/setup/global.ts'),
|
resolve(rootDir, './scripts/setup/global.ts'),
|
||||||
],
|
],
|
||||||
include: [
|
include: [
|
||||||
resolve(rootDir, 'packages/common/**/*.spec.ts'),
|
// rootDir cannot be used as a pattern on windows
|
||||||
resolve(rootDir, 'packages/common/**/*.spec.tsx'),
|
fg.convertPathToPattern(rootDir) +
|
||||||
resolve(rootDir, 'packages/frontend/**/*.spec.ts'),
|
'packages/{common,frontend}/**/*.spec.{ts,tsx}',
|
||||||
resolve(rootDir, 'packages/frontend/**/*.spec.tsx'),
|
|
||||||
],
|
],
|
||||||
exclude: [
|
exclude: [
|
||||||
'**/node_modules',
|
'**/node_modules',
|
||||||
|
|||||||
Reference in New Issue
Block a user