Commit Graph

5 Commits

Author SHA1 Message Date
djalim 4e220f72d7 style: format api mock return type and test imports/JSON body 2026-04-21 12:02:55 +02:00
djalim 61207e4f21 test: add mock DB helper for unit tests
Check Deno code / Check Deno code (pull_request) Failing after 39s
test: add tests for fixtures, mock fetch, mock db, and happy-dom

- Add comprehensive fixture shape tests.
- Expand mockFetch to support methods, status codes, and body tracking.
- Introduce getFetchCalls to inspect intercepted requests.
- Add mockDb helper for in-memory DB operations.
- Reorganize tests for clarity and coverage.
- Ensure happy-dom setup/cleanup works correctly.
2026-04-21 11:49:30 +02:00
djalim 204a590b37 refactor(test): improve fetch mock and update fixture types
Add support for HTTP methods, status codes, body and headers in the fetch
mock. Track calls and expose getFetchCalls for assertions. Update fixture
interfaces to use string IDs, add ImportResult and ApiError types, and
provide standard error constants. Adjust fixture data to match new types.
2026-04-21 11:31:45 +02:00
djalim edb20db2ef test: add e2e, integration, and unit tests for fixtures and mockFetch 2026-04-21 11:24:02 +02:00
djalim 56430f9991 test: add API mock, fixtures, and DOM helpers for tests 2026-04-21 11:23:21 +02:00