fix(create): Default test script no longer errors #3266
Merged
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.
When running
lerna create
, the generated files will now include a test that is actually runnable vialerna run test
.Description
Motivation and Context
Before this change, running
lerna run test
on a newly created package would produce an error that told the user to "run tests from the root", which makes no sense. This change improves developer experience when usinglerna create
by leaving the user's workspace in a runnable state immediately after package creation.How Has This Been Tested?
This has been tested manually, with and without --es-module, on a test lerna workspace. New unit tests have also been added as well as existing ones updated appropriately.
Types of changes
Checklist: