Celtrix icon indicating copy to clipboard operation
Celtrix copied to clipboard

[TESTS] Add unit tests for the custom stack generators in utils/customGenerators

Open ChandanVarshney031 opened this issue 1 month ago • 2 comments

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.example per choice: DB_PORT only for Docker, DIRECT_URL only for Supabase
  • Check docker-compose.yml per database
  • Check package scripts: db:up only with Docker, db:* only with Prisma

Acceptance criteria

  • [ ] No network or Docker needed
  • [ ] Runs inside npm test in a few seconds
  • [ ] Mention the new tests in CONTRIBUTING.md

ChandanVarshney031 avatar Oct 31 '26 08:10 ChandanVarshney031

please assign me.

pratikadamas avatar Nov 04 '26 15:11 pratikadamas

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 test script.
  • Updated CONTRIBUTING.md with 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!

Nikhil1869 avatar Nov 06 '26 15:11 Nikhil1869