mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 01:55:41 +00:00
test: add EDR passenger pricing/config E2E bug-hunt harness
Hermetic E2E harness targeting pricing integrity and backoffice config: - e2e/ docker Postgres (5544) + prepare.sh/run.sh one-command runner + HTML report - 6 suites / 23 tests reproducing pricing, FX, wallet, refund, config and auth defects (see docs/ISSUES.md); docs/e2e-test-matrix.md documents the matrix - two-tier harness (slim module boot + direct service instantiation) to work around the IAM/RabbitMQ/file-type boot wall - .env.test.example tracked; loader falls back to it for fresh checkouts Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
10
apps/edr-passenger-api/test/setup/stubs/file-type.ts
Normal file
10
apps/edr-passenger-api/test/setup/stubs/file-type.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* CommonJS stub for the ESM-only `file-type` package (v21). jest's CommonJS resolver cannot load
|
||||
* the real one, and `@tria-plc/api-common`'s minio.service `require("file-type")` at import time,
|
||||
* dragging the whole IAM stack down with it. minio.service only calls fileTypeFromBuffer when
|
||||
* actually processing an upload — never during pricing/booking tests — so a stub is sufficient to
|
||||
* let the full AppModule boot. Mapped via jest `moduleNameMapper` (^file-type$).
|
||||
*/
|
||||
export async function fileTypeFromBuffer(): Promise<undefined> {
|
||||
return undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user