Trek_CN/client
jubnl 68b660e547
fix(tests): use node:buffer.Blob so URL.createObjectURL works on Node 22
Node 22 URL.createObjectURL strictly requires a native node:buffer Blob
and throws ERR_INVALID_ARG_TYPE when given a jsdom Blob (caught by
fetchImageAsBlob, returning ''). Node 24 relaxed this check, masking the
failure locally.

Tests 007, 011: replace MSW/Response-based fetch mocks with direct
vi.spyOn(fetch) mocks returning node:buffer Blobs via a duck-typed
response object. The real URL.createObjectURL now handles the correct
Blob type and returns a genuine blob: URL on all Node versions.

Test 012: URL.createObjectURL identity varies across Node versions
making it impossible to spy on reliably. Replace createObjectURLSpy
assertion with a completedFetches counter in the fetch mock, which
proves the same semantic guarantee (6 requests ran, 7th was cleared).

setup.ts: restore the original conditional guard so the vi.fn fallback
only applies when URL.createObjectURL is completely absent, not
overwriting a working real implementation.
2026-04-07 23:54:01 +02:00
..
public ui(trip): replace plane loading animation with TREK logo GIF 2026-04-05 17:28:04 +02:00
scripts Add PWA support for iOS home screen install 2026-03-21 22:21:23 +01:00
src test(client): expand frontend test suite to 69.1% coverage 2026-04-07 21:56:08 +02:00
tests fix(tests): use node:buffer.Blob so URL.createObjectURL works on Node 22 2026-04-07 23:54:01 +02:00
index.html fix: harden PWA caching and client-side auth security 2026-03-31 00:33:58 +00:00
package-lock.json fix(client): resolve esbuild version conflict for CI 2026-04-07 22:40:08 +02:00
package.json fix(client): resolve esbuild version conflict for CI 2026-04-07 22:40:08 +02:00
postcss.config.js Initial commit — NOMAD (Navigation Organizer for Maps, Activities & Destinations) 2026-03-18 23:58:08 +01:00
tailwind.config.js Initial commit — NOMAD (Navigation Organizer for Maps, Activities & Destinations) 2026-03-18 23:58:08 +01:00
tsconfig.json test(front): add test suite frontend (WIP) 2026-04-07 12:31:09 +02:00
vite.config.js fix: harden PWA caching and client-side auth security 2026-03-31 00:33:58 +00:00
vitest.config.ts test(front): add test suite frontend (WIP) 2026-04-07 12:31:09 +02:00