fix(react-template): remove demo tests and format generated files after remove:demo - #1851
Merged
Merged
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Closes #1850
Bug description
After running
npm run remove:demoin a freshly initialized@pplancq/react-templateproject, the validation pipeline failed because:tests/unit/demo/still imported removed@Demo/...modules.package.jsonandtsconfig.jsonwere rewritten without a trailing newline, causing Prettier to complain.tests/e2e/demo.test.tswas left behind, failing against the new home page.Changes
tests/unit/demo/andtests/e2e/demo.test.tsduringremove:demo.tests/e2e/home.test.tsso the e2e suite still has tests to run..ts/.tsxfiles with double quotes and Prettier-compatible formatting.() => { ... }for the emptyContainerModulecallback to avoid the@typescript-eslint/no-unused-varserror.Homecomponent to satisfyarrow-body-style.package.jsonandtsconfig.json, then run Prettier on them to ensure they match the project's formatting rules.Verification
Tested by copying the template to a temporary directory, running
node scripts/removeDemo.cjs, and executing the full validation command from the issue:All steps now pass.