mirror of
https://github.com/lobehub/lobehub.git
synced 2026-09-20 04:56:13 +08:00
431f6371af
* ✅ test: sweep per-file base-ui mocks now real components render 101 test files audited: 28 mocks deleted outright, 10 switched to the canonical composed stubs, 42 trimmed to only the assertion-bound entries over an importOriginal spread, 21 left as-is (closed antd-style factories or already minimal). toast.loading stub now returns a close/update handle. Claude-Session: https://claude.ai/code/session_01UTDivfaszDuBjpPn7PV7gQ * ✅ test: sweep remaining ui/antd mocks, lift zustand/i18n mocks to global setup, prebundle @lobehub/ui - delete closed @lobehub/ui, base-ui, antd, antd-style render stubs across 150+ test files; keep only assertion-bound spies composed over importOriginal - register zustand/traditional and react-i18next key-passthrough (defaultValue-aware) mocks once in tests/setup.ts; drop 51 + 94 identical per-file copies - drop 18 usePermission mocks whose real implementation already returns allowed:true - prebundle @lobehub/ui (all subpaths) and motion via deps.optimizer so workers share one chunk instead of re-evaluating the ESM graph per file (585s -> 383s) - fix tests exposed by store auto-reset / prebundling: displayMessage leaked historyCount, copyToClipboard spyOn on ESM namespace, ApiKey defaultValue assertions, lazy executor timeout Claude-Session: https://claude.ai/code/session_01EjmRHEnEMf5mEDRFCDAjy1 * 🐛 fix(test): widen registerBeforeApprove callback type in webOnboarding test Claude-Session: https://claude.ai/code/session_01SoctQBoW5DDXH1brMcJ6yd * 🐛 fix(test): raise timeout for channel discard test rendering real form Claude-Session: https://claude.ai/code/session_01SoctQBoW5DDXH1brMcJ6yd
13 lines
197 B
TypeScript
13 lines
197 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
environment: 'node',
|
|
server: {
|
|
deps: {
|
|
inline: [/@lobehub\//],
|
|
},
|
|
},
|
|
},
|
|
});
|