listRecipes 按 §B.9-2 改为静态常量({id,label},不调 /api/ai/page-recipes)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
15 lines
452 B
TypeScript
15 lines
452 B
TypeScript
import { defineConfig } from 'vitest/config';
|
||
import react from '@vitejs/plugin-react';
|
||
|
||
// 组件/单元测试运行器(P4-5 onEvent 重放胶水测试)。
|
||
// 与 vite.config 隔离:测试用 jsdom 环境,不参与生产打包。
|
||
export default defineConfig({
|
||
plugins: [react()],
|
||
test: {
|
||
environment: 'jsdom',
|
||
globals: true,
|
||
setupFiles: ['./src/setupTests.ts'],
|
||
include: ['src/**/*.test.ts', 'src/**/*.test.tsx'],
|
||
},
|
||
});
|