Closed Krinkle closed 3 years ago
Skipped tests used to have an undefined
state, but as of Mocha 8.0 they have the "pending"
state. Perhaps we can safely map that to "skipped"? Maybe not, since it sounds like it would be used for tests that will run but haven't yet?
/cc @js-reporters/mocha Would welcome your recomendation on this matter :)
Tracked down to https://github.com/mochajs/mocha/commit/8236ffd7494 (https://github.com/mochajs/mocha/pull/4223), which introduced a new state STATE_PENDING
("pending"
) and assigned it to the .state
property which was previously left undefined for this case.
This wasn't mentioned in the changelog for Mocha 8.0.0, but I guess that's fair since the public API has offered isPending()
for many years which still works the same as before and actually uses a separate property .pending = true
and has for many years, so it didn't even need updating for this change.
The result of
npm run test-integration
with Mocha 8.0 and later is as follows:log/failed--mocha--8.0.0.log
``` not ok 106 Adapters integration > Mocha adapter > Event "testEnd" runtime property --- message: "failed" severity: failed actual : "undefined" expected: "number" stack: at collectedData.forEach.value (/js-reporters/test/integration/adapters.js:185:20) at Array.forEach (log/failed--mocha--8.1.3.log
``` not ok 106 Adapters integration > Mocha adapter > Event "testEnd" runtime property --- message: "failed" severity: failed actual : "undefined" expected: "number" stack: at collectedData.forEach.value (/js-reporters/test/integration/adapters.js:185:20) at Array.forEach (See also: