add testing suite

This commit is contained in:
2026-02-21 22:19:21 -05:00
parent 07128c3529
commit 83eee20b2c
25 changed files with 5317 additions and 1628 deletions

View File

@@ -79,6 +79,19 @@ Optional: update the map path in `index.js` if you have a local dungeon map.
---
## Project structure
- **`index.js`** Entry point: loads env, initializes the Ollama model, runs dungeon generation, image generation, and PDF output.
- **`src/`** Application modules:
- `dungeonGenerator.js` LLM-backed dungeon content generation and validation.
- `dungeonTemplate.js` HTML template and layout for the PDF.
- `ollamaClient.js` Ollama/Open WebUI API client and text cleaning.
- `imageGenerator.js` Map image generation (Ollama + optional ComfyUI).
- `generatePDF.js` Puppeteer-based PDF generation from the template.
- **`test/`** Unit tests (`test/unit/`) and integration tests (`test/integration/`).
---
## Example Output
* `the-tomb-of-shadows.pdf`