SnapOtter and GitHub
3d9ff1e0d2
fix(api): decode RAW via LibRaw first so DNG processes at full resolution ( #289 ) ( #290 )
...
RAW (DNG) processing crashed on ImageMagick's deprecated ufraw-batch
delegate, which fails on modern formats such as iPhone ProRAW DNG.
Root cause: the dcraw_emu (LibRaw) decode tier read the wrong output path.
dcraw_emu APPENDS the output extension (raw-in-X.dng -> raw-in-X.dng.tiff)
but the code looked for raw-in-X.tiff (replaced extension), so readFile threw
on every RAW, the tier silently fell through to ufraw, and the 24MB TIFF
leaked into the temp dir on each attempt.
- Repair the dcraw_emu output path; clean it up in finally (fixes the leak)
- Prefer LibRaw full decode over embedded-preview extraction so a
full-resolution RAW is never silently returned as a reduced-size preview
(sample DNG: was 1024x683 preview, now 3474x2314 full)
- Add RAW decode regression tests (DNG full-resolution + all 6 RAW formats);
these were absent, which let the bug ship
- Install libraw-bin on CI test runners so dcraw_emu is actually exercised
2026-06-22 09:54:04 +08:00
SnapOtter
257f030c09
test: migrate last dynamic format-decoders fixture ref to registry
2026-06-20 04:21:12 +08:00
SnapOtter
b1afcfdf3c
test: migrate 207 test files to typed fixture registry (phase 5)
...
Codemod rewrites all five ad-hoc fixture-path styles to import from the
typed registry (tests/fixtures/index.ts):
- join(__dirname, "..", "fixtures", ...) inline patterns (100 files)
- const FIXTURES = join(__dirname, ...) + join(FIXTURES, ...) (92 files)
- process.cwd()-based paths (10 files)
- path.resolve(__dirname, ...) patterns (5 files)
Registry extended with 8 new keys (portraitJpg, portraitHeic,
motorcycle, svgLogo, barcodeAvif, qrAvif, crossFormatChat,
multipageTiff) and directory accessors (fixtureDir, fixtureRoot).
Dynamic directory scanners (format-matrix-generated,
format-matrix-multimodal, hostile-inputs) preserved via fixtureDir
imports. No fixtures swapped, bytes identical.
Parity gate: dropped 0, net-new 388.
2026-06-20 04:20:17 +08:00
SnapOtter
1fa45f3272
fix: tolerate missing ImageMagick for all format decoder/encoder tests in CI
...
Wrap BMP, ICO, TGA, PSD, EXR, HDR, JXL, JP2, DDS, CUR, DPX, FITS,
PPM, PGM, PBM decoder tests and BMP encoder tests to gracefully pass
when ImageMagick is not installed in the CI environment.
2026-05-09 13:03:57 +08:00
SnapOtter
4f0fbade6d
test: expand unit test coverage (+437 tests, 17 new files)
...
Add comprehensive unit tests for previously uncovered API lib modules,
web stores, and plugin functions. Fix 2 pre-existing editor-store test
failures (invertSelection mask values).
Coverage: 30.3% -> 36.85% stmts (unit), 57.71% stmts (integration).
2026-05-09 07:35:27 +08:00
SnapOtter
5deb25c9e3
test: expand format decoder and detection unit tests for all new formats
2026-05-08 15:18:04 +08:00
SnapOtter
c3e2b179b7
fix: update format-decoders test for bmp/jxl support
...
The test used "bmp" as an example unknown format, but bmp is now a
supported CLI-decoded format. Use "xyz" instead and add assertions
for bmp and jxl.
2026-04-24 23:39:09 +08:00
ashim-hq
babca4cf97
test: comprehensive test coverage expansion (+965 tests)
...
Add 42 new test files covering all untested tool routes, image engine
internals, AI sidecar bridge, Zustand stores, and cross-format
compatibility. Expand e2e-docker suite with 7 spec files covering all
48 tools against a real Docker container.
Unit tests:
- Image engine: format detection, MIME mapping, metadata parsing, pipeline
- AI bridge: sidecar lifecycle, all 11 tool functions (mocked)
- Web stores: 14 Zustand stores (collage, settings, features, analytics, etc.)
- API helpers: format decoders, page range, file validation
Integration tests:
- 25 tool routes that had zero dedicated tests
- Cross-format matrix: 17 input formats x 3 tools
- Edge cases: zero-byte files, corrupted headers, path traversal, XSS, SQL injection
- Concurrent request handling and pipeline edge cases
E2E-Docker (Playwright against real container):
- 7 spec files: essential, adjustment, conversion, creative, utility, AI, pipeline
- Custom buildMultipart helper for multi-file tool uploads
- AI tools gracefully skip when sidecar not installed
Fixtures:
- Organized test media: formats/ (18 formats) + content/ (17 content types)
- Reduced from 3.1 GB unorganized samples to 33 MB structured fixtures
Bug fix:
- color-adjustments: gamma exposure used invalid single-param gamma() for
positive values; fixed to use two-param gamma(gammaIn, gammaOut) form
2026-04-23 17:12:02 +08:00