Skip to content

Allow commented skips in no-pending-tests - #445

Merged
lo1tuma merged 2 commits into
mainfrom
allow-commented-pending-tests
May 24, 2026
Merged

Allow commented skips in no-pending-tests#445
lo1tuma merged 2 commits into
mainfrom
allow-commented-pending-tests

Conversation

@lo1tuma

@lo1tuma lo1tuma commented May 24, 2026

Copy link
Copy Markdown
Owner

Closes #201.

Adds an allowSkippedWithComment option to mocha/no-pending-tests.
It allows explicit skip forms when they have an immediately preceding comment,
while keeping bare pending tests disallowed.

lo1tuma added 2 commits May 24, 2026 20:54
Allow explicit Mocha skip forms when they have an immediate reason comment.
Keep bare pending tests disallowed and require the comment to be
adjacent to the skipped call without a blank line.
Remove an unreachable guard in the skip comment helper and add a
suite skip case for the allowSkippedWithComment option.

This restores 100% coverage for the rule under c8.
@lo1tuma
lo1tuma merged commit da48e48 into main May 24, 2026
11 of 13 checks passed
@lo1tuma
lo1tuma deleted the allow-commented-pending-tests branch May 24, 2026 20:12
lo1tuma added a commit that referenced this pull request Jul 17, 2026
Allow commented skips in no-pending-tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rule proposal: no-skip-without-comment

1 participant