Closes the last genuinely-empty directory from the prior investigation pass: packages/cli/test/ had zero files despite args.ts/index.ts having real logic. Added 24 passing vitest tests (10 for parseArgs/requireFlag edge cases, 14 for index.ts's command dispatch against a mocked @qie-forge/core) and wired packages/cli into the workspace test/lint scripts. Refactored run()/main() slightly so handler errors are caught and turned into a proper exitCode in one place, making dispatch directly testable without spawning the real CLI process. Committed the previously-uncommitted TEST_LOCK serialization fix for packages/rust/tests/anvil_integration.rs (closes a real resource- contention flake between the two anvil-backed tests, confirmed passing 3x locally, 161-162s each run). Corrected docs/STATUS.md: QieForgeVault.deposit()/withdraw() lender-share accounting has existed since f55e3c6 (18 passing Foundry tests prove it), but a stale "no lender deposit/withdraw flow" claim kept getting repeated in STATUS.md and commit messages without re-reading the actual contract. Removed the false gap, updated the real test counts (41/41 Foundry tests, not 35/35), and documented the new CLI coverage. Full workspace verification: npm test (33/33 JS tests), forge test (41/41), cargo test --test anvil_integration (2/2), pytest (15/15, 8 live-gated skipped), npm run build + npm run lint (core+cli), and `next build` for apps/web — all clean. Live-verified the already-shipped demo deployment is still actually serving real data: curl against qie-forge.vercel.app/api/quote and /api/vault-position return the real on-chain quote (10 WQIE -> 1.39573 TUSD) and real vault position (500,000 WQIE collateral, 20,000 TUSD debt, 2.8x health factor) described in STATUS.md, and both /swap and /vault render the "demo network" banner live, not the empty "not deployed" state.
10 lines
182 B
TypeScript
10 lines
182 B
TypeScript
import { defineConfig } from "vitest/config";
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
environment: "node",
|
|
testTimeout: 20_000,
|
|
include: ["test/**/*.test.ts"],
|
|
},
|
|
});
|