-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix: Register and run default preprocessor in child process #8826
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
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.
LGTM
const deferred = () => { | ||
let reject | ||
let resolve | ||
const promise = new Promise((_resolve, _reject) => { | ||
resolve = _resolve | ||
reject = _reject | ||
}) | ||
|
||
return { promise, resolve, reject } | ||
} |
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.
could also use Bluebird.defer
, it's deprecated but i won't tell 🤫
This PR introduced a new issue: #8864 |
This PR introduced this new issue: #9145 |
This PR introduced a new issue: #14587 |
This PR also introduced #9326 |
User facing changelog
Additional details
We run user-registered file preprocessors in the plugins child process, but when the user hasn't registered their own prepocessor, we register the default preprocessor in the main Cypress process. This causes issues with preprocessor-related plugins like Istanbul that use
process.execPath
to execute code becauseprocess.execPath
is the Cypress binary in the main process and notnode
.This fixes that by always registering and running the preprocessor in the child process, even our own default preprocessor.
Also, we used to not create the plugins child process if the user didn't have a plugins file. Now we always create it since it is necessary for running the default preprocessor.
PR Tasks
cypress-documentation
?type definitions
?cypress.schema.json
?