1
0
mirror of synced 2026-03-23 02:58:34 +08:00

test: jest 改成 vitest

This commit is contained in:
roymondchen
2022-06-07 20:07:47 +08:00
committed by jia000
parent a418bf14de
commit ca4a6b596d
14 changed files with 644 additions and 229 deletions

View File

@@ -1,10 +1,33 @@
import { resolve } from 'path';
import { defineConfig } from 'vitest/config';
import Vue from '@vitejs/plugin-vue';
const r = (p: string) => resolve(__dirname, p);
export default defineConfig({
plugins: [Vue()],
test: {
globals: true,
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/cypress/**',
'**/.{idea,git,cache,output,temp}/**',
'magic-admin/**',
],
include: [
'./packages/editor/tests/unit/utils/**',
'./packages/editor/tests/unit/services/**',
'./packages/utils/tests/**',
],
environment: 'jsdom',
},
resolve: {
alias: {
'@editor': r('./packages/editor/src'),
'@form': r('./packages/form/src'),
},
},
});