feat(image): 新建knowai-ui:1.0.0镜像并完成推送
- 最终完成16个组件的搭建,覆盖常用组件和布局 - 通过tsc eslint完成测试,vitest测试因未知问题放弃(但保留测试文件) BREAKING CHANGE: 新镜像分支
This commit is contained in:
43
vitest.config.ts
Normal file
43
vitest.config.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import { fileURLToPath, URL } from 'node:url';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
'~': fileURLToPath(new URL('./src', import.meta.url))
|
||||
},
|
||||
},
|
||||
test: {
|
||||
timeout: 60000, // 60秒超时
|
||||
globals: true,
|
||||
environment: 'jsdom', // Vue组件测试需要浏览器环境
|
||||
threads: false, // 禁用多线程以解决线程相关报错
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
reporter: ['text', 'json', 'html'],
|
||||
exclude: [
|
||||
'node_modules/',
|
||||
'dist/',
|
||||
'**/*.config.js',
|
||||
'**/*.config.ts',
|
||||
'**/*.d.ts',
|
||||
'**/index.ts',
|
||||
'**/*.test.ts',
|
||||
'**/*.spec.ts',
|
||||
],
|
||||
thresholds: {
|
||||
global: {
|
||||
branches: 80,
|
||||
functions: 80,
|
||||
lines: 80,
|
||||
statements: 80,
|
||||
},
|
||||
},
|
||||
},
|
||||
setupFiles: ['./test/setup.ts'], // 全局测试设置
|
||||
include: ['src/**/*.test.ts', 'src/**/*.spec.ts']
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user