pest icon indicating copy to clipboard operation
pest copied to clipboard

[Bug]: Tests with named datasets are not included in filters

Open i906 opened this issue 2 years ago • 1 comments

What Happened

When I was using Pest 1, I am able to filter tests by the dataset name.

Screenshot 2023-10-27 at 7 20 27 PM

After upgrading to Pest 2, I am no longer to filter tests with the same way.

Screenshot 2023-10-27 at 7 20 57 PM

How to Reproduce

  1. Clone nunomaduro/skeleton-php
  2. Add a dataset at tests/Datasets/Names.php
dataset('names', function () {
    yield 'my dataset name 27' => ['arg1'];
});
  1. Add a test using the dataset
it('should filter dataset with name', function($arg) {
   expect($arg)->toBe('arg1');
})->with('names');
  1. Run command vendor/bin/pest --filter="27".

Sample Repository

No response

Pest Version

2.24.1

PHP Version

8.1.23

Operation System

macOS

Notes

No response

i906 avatar Oct 27 '23 11:10 i906

Related to #1369

This is still an issue.

tylernathanreed avatar Mar 26 '25 15:03 tylernathanreed

fixed on 4.x

nunomaduro avatar Jul 30 '25 21:07 nunomaduro