[TESTS] Add unit tests for the custom stack generators in utils/customGenerators
Description
The README says npm test covers wizard navigation and the welcome page. The generators (env, docker, database, wiring) are only covered by the slow e2e test that needs Docker.
Proposed solution
- Run each generator against a temp directory and assert the generated files
- Check
.env.exampleper choice:DB_PORTonly for Docker,DIRECT_URLonly for Supabase - Check
docker-compose.ymlper database - Check package scripts:
db:uponly with Docker,db:*only with Prisma
Acceptance criteria
- [ ] No network or Docker needed
- [ ] Runs inside
npm testin a few seconds - [ ] Mention the new tests in
CONTRIBUTING.md
please assign me.
Hi @JoeCelaster and maintainers,
I would like to contribute to this issue.
I've already worked on a local implementation on branch test/320-custom-generators. I've added unit tests for the environment, Docker, database, and wiring generators using temporary directories.
I've also:
- Added the new test files to the
npm testscript. - Updated
CONTRIBUTING.mdwith testing instructions. - Verified that the tests run without Docker or network access.
The complete test suite currently passes with 89 tests and 0 failures.
I noticed another contributor has also expressed interest in this issue. Could you please confirm whether I can proceed with the implementation and open a PR?
Thanks!