家长端结构化题目编辑器:题型联动表单替代 JSON 文本域,应用题支持 judgeMode 切换
- 新增 question-list.tsx:结构化题目卡片列表(选择题/判断题/填空题/应用题) - 新增 question-list.test.tsx:4 个 RTL 组件测试覆盖渲染/新增/编辑/校验 - paper-form.tsx:JSON textarea 替换为 QuestionList,保存时序列化 QuizQ[] - vitest.config.ts:加 @vitejs/plugin-react 支持 JSX 组件测试 - test-setup.ts:注册 afterEach cleanup 避免跨测试 DOM 污染 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Haiku 4.5
parent
255c9a244c
commit
0749ba2c38
@@ -1,8 +1,10 @@
|
||||
import path from "node:path";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { defineConfig } from "vitest/config";
|
||||
|
||||
// xuchao: Vitest 配置——@ 别名对齐 tsconfig;组件测试文件用 // @vitest-environment jsdom 标注
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
resolve: { alias: { "@": path.resolve(__dirname, "src") } },
|
||||
test: {
|
||||
environment: "node",
|
||||
|
||||
Reference in New Issue
Block a user