Skip to content

[Bug]: --parallel does not handle multiple --exclude-group flags #1437

@glmdev

Description

@glmdev

What Happened

./vendor/bin/pest --exclude-group='foo' --exclude-group='should exclude' --parallel

This only excludes the foo group, causing the should exclude tests to be executed.

How to Reproduce

Using Pest 3.8.3 in a clean workspace, I have modified the ExampleTest as follows:

<?php

test('example', function () {
    expect(true)->toBeTrue();
});

test('exclude me', function () {
    expect(false)->toBeTrue();
})->group('should exclude');

The test suite when run with --parallel ignores subsequent --exclude-group flags. Scenarios:

  • ./vendor/bin/pest --exclude-group='foo,should exclude' -- works fine
  • ./vendor/bin/pest --exclude-group='foo,should exclude' --parallel -- works fine
  • ./vendor/bin/pest --exclude-group='foo' --exclude-group='should exclude' -- works fine
  • ./vendor/bin/pest --exclude-group='foo' --exclude-group='should exclude' --parallel -- only excludes the foo group, causing the should exclude test to be executed

Sample Repository

No response

Pest Version

3.8.3

PHP Version

8.3.24

Operation System

Linux

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions