v1.0.9-beta.035 - test: achieve 100% core coverage with 99 comprehensive integration tests
This commit finalizes the backend testing suite, bringing the total to 99 passing tests. It introduces rigorous validations for the file system, network scraping, gamification engines, and API security, while resolving critical memory leaks in the test runner.
New Test Suites Added:
- Data Pipelines: importer.ts, converter.ts, library-scanner.ts
- Network & Scrapers: getcomics.ts, prowlarr.ts, download-clients.ts, hosters.ts
- Ecosystem & Gamification: metadata-writer.ts, koreader.ts, discord.ts, mailer.ts, trophy-evaluator.ts
- API Routes: uploads-security, import-csv, progress, opds
Fixes & Optimizations:
- Fixed a major Vitest memory leak (OOM crash) by mocking C++ WASM binaries (node-unrar-js) and image processors (sharp).
- Fixed infinite recursion loops in library-scanner by safely scoping fs.readdir mocks.
- Implemented cross-env in package.json to ensure Windows/Linux cross-compatibility for --max-old-space-size memory limits.
- Configured Vitest to use --pool=forks to ensure aggressive garbage collection between test suites.