Skip to content

test: add end-to-end tests for create-electron-app across all templates and package managers#4218

Open
erikian wants to merge 13 commits intonextfrom
test/template-creation
Open

test: add end-to-end tests for create-electron-app across all templates and package managers#4218
erikian wants to merge 13 commits intonextfrom
test/template-creation

Conversation

@erikian
Copy link
Copy Markdown
Member

@erikian erikian commented Apr 16, 2026

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • The testsuite passes successfully on my local machine (if applicable).

Summarize your changes:

This allows us to catch any issues when creating a project with create-electron-app using any Forge template and any supported package manager, and also fixes one such issue I found in @electron-forge/template-base when testing this locally (we had exports instead of main in package.json, so Electron would fail to find the project's entrypoint).

create-electron-app always generates CommonJS projects, so this doesn't test ESM projects for now since a programmatic conversion of the project files (or actually creating ESM projects natively through a CLI flag or something) would be non-trivial enough to warrant a separate PR.

As a stopgap solution until our ESM story for templates is clearer, I've added a moduleFormats option to the test suite so that we can pick whether we want to test CommonJS, ESM, or both; this way, we can manually edit the template files in our local checkout to make any changes required for ESM to work and run the test using the local version installed through Verdaccio. This should allow us to test @erickzhao's changes in #4184 more easily.

@github-actions github-actions Bot added the next label Apr 16, 2026
@erikian erikian force-pushed the test/template-creation branch 2 times, most recently from 5be8b3d to f01f2e0 Compare April 19, 2026 15:06
@erikian erikian force-pushed the test/template-creation branch from ed1ad42 to e7850b0 Compare April 20, 2026 17:16
@erikian erikian changed the title test: add tests for template creation test: add end-to-end tests for create-electron-app across all templates and package managers Apr 20, 2026
@erikian erikian marked this pull request as ready for review April 20, 2026 21:57
@erikian erikian requested a review from a team as a code owner April 20, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant