Skip to content

fix: add tests without explicit group to 'default' group#1712

Open
YoussefMansour9 wants to merge 1 commit into
pestphp:4.xfrom
YoussefMansour9:fix/default-group
Open

fix: add tests without explicit group to 'default' group#1712
YoussefMansour9 wants to merge 1 commit into
pestphp:4.xfrom
YoussefMansour9:fix/default-group

Conversation

@YoussefMansour9
Copy link
Copy Markdown

Fixes #1602 - Running pest --group=default now correctly runs Pest tests that don't have an explicit group, matching PHPUnit's behavior.

What happened

When running ./vendor/bin/pest --group=default, zero tests were executed, even though there were Pest tests without explicit groups.

Root cause

PHPUnit treats tests without an explicit @group annotation as being in the "default" group. However, Pest tests created with test() or it() didn't have any group assigned, so --group=default found nothing.

Solution

Add tests without an explicit group to the "default" group in TestRepository, matching PHPUnit's behavior.

Fixes pestphp#1602 - Running pest --group=default now correctly runs Pest
tests that don't have an explicit group, matching PHPUnit's behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: --group=default unsupported in Pest

1 participant