-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
semver-patchimplementation requires increase of "patch" version number; "bug fixes"implementation requires increase of "patch" version number; "bug fixes"status: accepting prsMocha can use your help with this one!Mocha can use your help with this one!type: buga defect, confirmed by a maintainera defect, confirmed by a maintainer
Milestone
Description
Bug Report Checklist
- I have read and agree to Mocha's Code of Conduct and Contributing Guidelines
- I have searched for related issues and issues with the
faqlabel, but none matched my issue. - I have 'smoke tested' the code to be tested by running it outside the real test suite to get a better sense of whether the problem is in the code under test, my usage of Mocha, or Mocha itself.
- I want to provide a PR to resolve this
Expected
When a test is skipped via skip it shows "skipped" in the report including the reason passed to skip and you can click it and see the test.
Actual
It shows "pending" and there's nothing to click
Screen.Recording.2024-04-16.at.08.55.19.mov
Minimal, Reproducible Example
mocha.setup('bdd');
describe('test', () => {
it('one', async function () {
this.skip('reason1');
});
it('two', function (done) {
this.skip('reason2');
});
it('three', function () {
this.skip('reason3');
});
it('four', function () {
});
});
mocha.run();
jsfiddle: https://jsfiddle.net/greggman/uyp5nvLo/
Versions
// mocha@10.4.0 in javascript ES2018
Additional Info
I'm guessing this is considered "working as intended"? Every other test system I've used (which isn't many) tells you "skipped" when skipping a test. Pending = the test is still running with a very long timeout.
I spent an hour or more trying to figure out why skip wasn't working since it wasn't telling me 'skipped' but 'pending'. That's when I made the minimal repo and found 'pending' apparently means 'skipped' because if I don't call 'done' then I get a timeout
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
semver-patchimplementation requires increase of "patch" version number; "bug fixes"implementation requires increase of "patch" version number; "bug fixes"status: accepting prsMocha can use your help with this one!Mocha can use your help with this one!type: buga defect, confirmed by a maintainera defect, confirmed by a maintainer
Type
Projects
Status
No status