Files
PlantAI-rag-new/tests/frontend/unit/b3/vitest.config.js
T
jerryandClaude Fable 5 1e94de7464 PlantAI-rag-new 首次提交:文献知识工作台
- BFF 薄适配层(FastAPI,8090):QA 代理/SSE 中继/Neo4j 直连/抽取代理/会话持久化
- Vue3 前端:五相位检索流水线、文献来源与证据链、知识图谱、提取任务四 tab
- 四档响应式(桌面/笔记本/平板/手机)、深浅主题
- 81 个 FR 全部实现,测试追溯矩阵 81/81,后端 121 测/前端 156 测
- 真实凭据已脱敏,运行时配置在 backend/.env(不入 git)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-25 20:47:52 +08:00

29 lines
1.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// vitest.config.js —— B3 单测局部配置(B3 归属,位于 tests/frontend/unit/b3/)
// B1 尚未交付 frontend/vitest.config.js,此处提供最小可用配置保证 B3 单测可独立运行。
// 因本目录在 frontend/ 之外,node_modules 解析与别名均需显式指到 frontend/node_modules。
// 待 B1 总配置就绪后,PM 集成时可删除本文件,改用统一配置(需 include 覆盖本目录)。
import { fileURLToPath } from 'node:url';
import path from 'node:path';
import { defineConfig } from '../../../../frontend/node_modules/vitest/dist/config.js';
import vue from '../../../../frontend/node_modules/@vitejs/plugin-vue/dist/index.mjs';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const nm = (rel) => path.resolve(__dirname, '../../../../frontend/node_modules', rel);
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
vue: nm('vue/dist/vue.runtime.esm-bundler.js'),
pinia: nm('pinia/dist/pinia.mjs'),
vitest: nm('vitest/dist/index.js'),
'@vue/test-utils': nm('@vue/test-utils/dist/vue-test-utils.esm-bundler.mjs'),
},
},
test: {
environment: 'jsdom',
include: ['**/*.test.js'],
globals: false,
},
});