listRecipes 按 §B.9-2 改为静态常量({id,label},不调 /api/ai/page-recipes)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
10 lines
354 B
TypeScript
10 lines
354 B
TypeScript
// 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();
|
|
});
|