How can I prevent failing Livewire 3 tests outputting the whole page html?

19 Views Asked by At

When creating a basic test using Laravel 10 and Livewire 3, if the test fails, a significant amount of HTML is output to the console as part of the failure. All to tell me that some string isn't in the HTML.

An example might be

public function testExample(): void
{
   $this->get('/example')->assertSeeLivewire(SomeComponent::class);
}

Whilst writing tests if one happens to fail, I must wait up to 1-2 minutes for all this markup to scroll past in my console. For some reason I cannot CTRL+C in the PHP Storm Terminal window to close the process.

Is is possible to restrict or remove this output to make test creation quicker and easer? I do not want to use -q as this silences all output, even the error I might need to fix.

0

There are 0 best solutions below