| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Step events (started, finished, passed, failed) were emitted as raw plain objects from IPC serialization. Plugins listening to these events received objects without Step class methods (toString, toCliStyled), causing [object Object] in reporter output. Apply the same deserialization pattern already used for test events (deserializeTest) — wrap message.data in a Step instance via Object.assign(new Step(data.title), data). Ref: testomatio/e2e-tests#151 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Add regression tests
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Problem
In run-workers mode, step events (step.started, step.finished, step.passed, step.failed) are emitted as raw plain objects from IPC serialization. These objects lack Step class methods (toString(), toCliStyled()), so any plugin or reporter calling step.toString() gets "[object Object]" instead of the actual step description.
This affects all consumers of step events in worker mode — for example, @testomatio/reporter shows:
Test events already go through deserializeTest() which restores a full object with methods. Step events had no equivalent deserialization — this PR adds it.
Solution
Add deserializeStep() — a one-liner that wraps the serialized data in a Step instance via Object.assign(new Step(data.title), data), matching the pattern already used inside deserializeTest for test.steps (see lib/mocha/test.js:80).
Apply it to all four step event types before emitting.
Related