feat: improves exporter

This commit is contained in:
Nuno Maduro
2023-02-13 23:56:19 +00:00
parent dd4247e150
commit 427ee89ae6
8 changed files with 29 additions and 23 deletions

View File

@ -11,10 +11,10 @@ use Pest\Factories\Covers\CoversFunction;
use Pest\Factories\Covers\CoversNothing;
use Pest\Factories\TestCaseMethodFactory;
use Pest\Support\Backtrace;
use Pest\Support\Exporter;
use Pest\Support\HigherOrderCallables;
use Pest\Support\NullClosure;
use Pest\TestSuite;
use SebastianBergmann\Exporter\Exporter;
/**
* @internal
@ -276,12 +276,13 @@ final class TestCall
*/
private function addChain(string $file, int $line, string $name, array $arguments = null): self
{
$exporter = Exporter::default();
$this->testCaseMethod
->chains
->add($file, $line, $name, $arguments);
if ($this->descriptionLess) {
$exporter = new Exporter();
Exporter::default();
if ($this->testCaseMethod->description !== null) {
$this->testCaseMethod->description .= ' → ';
}