Now I use ./vendor/bin/pest
as explained in the docs. But that makes me run all tests. What if I only want to run one specific example? Do I need to use groups or can it be done in an easier way?
How can I run a specific example using PEST (PHP)
1.1k views Asked by Brainmaniac At
2
There are 2 answers
0
On
Append ->only()
to the end of the test to run:
test('sum', function () {
$result = sum(1, 2);
expect($result)->toBe(3);
})->only();
See the docs
Filtering of tests isn’t part of the Pest framework, instead that is handled by the underlying test runner. This is most commonly PHPUnit and you can find a list of the CLI options in their docs.