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:
9
src/setupTests.ts
Normal file
9
src/setupTests.ts
Normal 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();
|
||||
});
|
||||
Reference in New Issue
Block a user