feat(modeler): meta/recipe/publish api modules + vitest jest-dom setup

listRecipes 按 §B.9-2 改为静态常量({id,label},不调 /api/ai/page-recipes)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-20 09:35:43 +08:00
parent ae0155eb2c
commit 4b9c9338f3
8 changed files with 247 additions and 0 deletions

9
src/setupTests.ts Normal file
View File

@@ -0,0 +1,9 @@
// vitest 全局测试基建:注册 jest-dom 断言匹配器 + 每个用例后自动卸载组件树。
// 在 vitest.config.ts 的 test.setupFiles 里登记,所有 *.test.tsx 共享。
import '@testing-library/jest-dom/vitest';
import { afterEach } from 'vitest';
import { cleanup } from '@testing-library/react';
afterEach(() => {
cleanup();
});