fix resolve res in Vitest
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
import path from 'node:path';
|
||||
|
||||
import {defineConfig} from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
resolve: {
|
||||
alias: {
|
||||
// Keep shared components' application-root imports resolvable in tests.
|
||||
'@': path.resolve(__dirname, '.'),
|
||||
},
|
||||
},
|
||||
test: {
|
||||
environment: 'node',
|
||||
globals: true,
|
||||
@@ -12,6 +20,7 @@ export default defineConfig({
|
||||
'miniprogram/**/*.test.js',
|
||||
'scripts/**/*.test.ts',
|
||||
'packages/shared/src/**/*.test.ts',
|
||||
'packages/shared/src/**/*.test.tsx',
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user