mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-08-29 04:32:06 -04:00
* test(server): add H3 event stubs and createMockH3Event factory Expanded test/setup.ts with 14 more H3/Nuxt globals: - Request accessors: readFormDataBody, getCookie, getRequestURL, getRequestIP - Response mutators: setHeader, setCookie, deleteCookie, setResponseStatus, setResponseHeaders - Response senders: sendRedirect, sendStream, sendError, sendNoContent - Plugin helpers: defineNitroPlugin, defineNitroErrorHandler Added server/test/utils/h3.ts with createMockH3Event factory. Returns a partial H3Event with vi.fn spies for setHeader/sendError/ setCookie/etc. so handlers can be tested without booting Nuxt. Supports method/url/body/query/headers/cookies/routerParams overrides. Added server/test/unit/h3-factory.test.ts with 2 tests for the factory itself. 28 tests pass (up from 26). Refs plan at .opencode/plans/hyperplan-dep-tdd-coverage.md PR5. * test: prettier format setup.ts + fix await in h3-factory test (#35) Co-authored-by: bot <ci@local> * test: make 'accepts overrides' it() async for await resolves (#37) Co-authored-by: bot <ci@local> --------- Co-authored-by: bot <ci@local> |
||
|---|---|---|
| .. | ||
| db.ts | ||
| h3.ts | ||