-
-
Notifications
You must be signed in to change notification settings - Fork 750
Fix run-rerun command displaying "OK | 0 passed" when tests fail #5193
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
Closed
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
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
@Copilot
Copilot
AI
changed the title
(削除) [WIP] I run one test using codeceptjs run, test failed but got OK | 0 passed in the output. (削除ここまで)
(追記) Fix run-rerun command displaying "OK | 0 passed" when tests fail (追記ここまで)
Sep 18, 2025
Copilot stopped work on behalf of
kobenguyent due to an error
September 18, 2025 15:08
@kobenguyent
kobenguyent
deleted the
copilot/fix-7609953f-c3e0-4bc9-b74d-21c6b21bd73c
branch
September 18, 2025 15:12
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.
Uh oh!
There was an error while loading. Please reload this page.
Problem
The
run-rerun
command could display misleading output like "OK | 0 passed" even when tests actually failed. This occurred because theevent.all.result
event was being emitted with incorrect data, causing listeners to receive empty or invalid result information.Root Cause
In
lib/rerun.js
, the finalevent.all.result
emission was passing the rerunner instance (this
) instead of the actual result object (container.result()
):This inconsistency with the regular
run
command (which correctly emitscontainer.result()
) meant that event listeners expecting result data would receive the wrong object type.Solution
Changed the event emission in the rerun's
run()
method to emit the proper result object, ensuring consistency with other commands and accurate result reporting.Testing
Impact
This fix ensures that users get accurate result summaries from the
run-rerun
command, preventing confusion when tests fail but appear to show successful results.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
googlechromelabs.github.io
node install.mjs
(dns block)https://storage.googleapis.com/chrome-for-testing-public/138.0.7204.168/linux64/chrome-headless-shell-linux64.zip
node install.mjs
(http block)https://storage.googleapis.com/chrome-for-testing-public/138.0.7204.168/linux64/chrome-linux64.zip
node install.mjs
(http block)jsonplaceholder.typicode.com
node /home/REDACTED/work/CodeceptJS/CodeceptJS/node_modules/.bin/mocha test/unit --recursive --timeout 10000
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.