Hello 👋
I'm confused about the following logic for determining the test state upon the test ending.
Why is the default state PASSED?
When prepending an event listener to the EVENT_SUITE_END event, I noticed the tests within the suite would have the status of undefined. Is this the reason for the logic? If so, why is it the case that the test statuses are undefined when the suite has ended?
|
onTestFinish(test) { |
|
const status = test.state || (test.pending && testStatuses.SKIPPED) || testStatuses.PASSED; |
|
this.finishTest(test, status); |
|
} |
Hello 👋
I'm confused about the following logic for determining the test state upon the test ending.
Why is the default state
PASSED?When prepending an event listener to the
EVENT_SUITE_ENDevent, I noticed the tests within the suite would have the status ofundefined. Is this the reason for the logic? If so, why is it the case that the test statuses areundefinedwhen the suite has ended?agent-js-mocha/lib/mochaReporter.js
Lines 266 to 269 in b076592