-
Notifications
You must be signed in to change notification settings - Fork 561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrap generating e2e script into async func #3936
Conversation
|
size-limit report 📦
|
@broccolinisoup just as another option, you can also replace the import to |
} | ||
|
||
generateE2ETests() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One suggestion, instead of the try-catch block we could instead add .catch()
to the promise call and log/exit from there.
generateE2ETests() | |
generateE2ETests() | |
.catch((error) => { | |
// eslint-disable-next-line no-console | |
console.log(error) | |
process.exit(1) | |
}); |
Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days. |
Changelog
New
Changed
Running the
script/generate-e2e-tests.js
throws an error due to prettier.format retuning a Promise object, not string. (docs reference)I wrapped the code into an async function and awaiting the prettier.format. Let me know if there is a better way to do it!
Removed
Rollout strategy
Testing & Reviewing
Could be test adding a new item to the
components
array with an id and story name to check if the script generates a test file.Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.