mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
fix: panic with TestDescriptionMissing
This commit is contained in:
@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace Pest;
|
||||
|
||||
use NunoMaduro\Collision\Writer;
|
||||
use Pest\Exceptions\TestDescriptionMissing;
|
||||
use Pest\Support\Container;
|
||||
use Symfony\Component\Console\Output\ConsoleOutput;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
@ -27,6 +28,10 @@ final class Panic
|
||||
*/
|
||||
public static function with(Throwable $throwable): never
|
||||
{
|
||||
if ($throwable instanceof TestDescriptionMissing && ! is_null($previous = $throwable->getPrevious())) {
|
||||
$throwable = $previous;
|
||||
}
|
||||
|
||||
$panic = new self($throwable);
|
||||
|
||||
$panic->handle();
|
||||
|
||||
Reference in New Issue
Block a user