Skip to content

fix: show skipped instead of pending for this.skip() - #6229

Open
arronKler wants to merge 1 commit into
mochajs:mainfrom
arronKler:fix/5138-skip-not-pending
Open

fix: show skipped instead of pending for this.skip()#6229
arronKler wants to merge 1 commit into
mochajs:mainfrom
arronKler:fix/5138-skip-not-pending

Conversation

@arronKler

Copy link
Copy Markdown

PR Checklist

Overview

this.skip() was reported as pending, the same label used for unimplemented tests (it('title') with no callback). That made skipped tests look unfinished.

This keeps the pending event and stats as they are, and only changes the displayed text:

  • this.skip() is marked skipped and reporters show "skipped"
  • unimplemented tests still show "pending"

HTML hover text is (skipped) for this.skip() and (pending) otherwise. Spec/list append (skipped) for skipped tests, and the epilogue reports skipped vs pending separately.

Fixes #5138

Tests skipped at runtime via this.skip() were reported as pending,
the same label used for unimplemented tests. Keep empty it() cases
as pending and display skipped for this.skip() in reporters.

Fixes mochajs#5138
@linux-foundation-easycla

Copy link
Copy Markdown

CLA Not Signed

@arronKler

Copy link
Copy Markdown
Author

recheck

@mark-wiemer mark-wiemer added this to Mocha Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

🐛 Bug: skip shows "pending" instead of "skipped"

2 participants