-
-
Notifications
You must be signed in to change notification settings - Fork 727
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: no error thrown from rerun script #4494
fix: no error thrown from rerun script #4494
Conversation
function processError(err) { | ||
printError(err) | ||
process.exit(1) | ||
} |
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.
This function was unused.
@@ -96,4 +96,18 @@ describe('run-rerun command', () => { | |||
}, | |||
) | |||
}) | |||
|
|||
it('should throw exit code 1 if all tests were supposed to pass', (done) => { |
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.
I've verified that this test fails without my changes.
This reverts commit 6cba723.
@kobenguyent thanks for taking a look at this! Not to rush, but do you know when this would be ready to merge? I've made a similar PR for a fork on my team's repository but we were wondering if we should just wait for this PR to be merged instead. Let me know if you'd like for me to address any feedback! |
@lin-brian-l we are planning to release very soon. Thanks for your contribution! |
Motivation/Description of the PR
Our team observed that using
codeceptjs run-rerun
would only throw an exit code of1
if the last test failed, making it difficult to reliably determine if a test in the suite actually was flaky. After some investigating, we determined that it's because thecatch
statement inrun-rerun.js
was never being called due torerun.js
never actually throwing the error.Applicable helpers:
Applicable plugins:
Type of change
Checklist:
npm run docs
)npm run lint
)npm test
)