fix: no --dirty tests found

This commit is contained in:
Nuno Maduro
2023-02-12 01:06:02 +00:00
parent e749af6d91
commit 0e9c1bc0f7
6 changed files with 126 additions and 30 deletions

View File

@ -6,7 +6,8 @@ namespace Pest\TestCaseFilters;
use Pest\Contracts\TestCaseFilter;
use Pest\Exceptions\MissingDependency;
use Pest\Exceptions\NoTestsFound;
use Pest\Exceptions\NoDirtyTestsFound;
use Pest\Panic;
use Pest\TestSuite;
use Symfony\Component\Process\Process;
@ -66,7 +67,7 @@ final class GitDirtyTestCaseFilter implements TestCaseFilter
$dirtyFiles = array_values($dirtyFiles);
if ($dirtyFiles === []) {
throw new NoTestsFound();
Panic::with(new NoDirtyTestsFound());
}
$this->changedFiles = $dirtyFiles;