Closed eleftrik closed 1 year ago
You can use renderUsing(new BufferedOutput)
.
Ok, now I've setup my Pest test like this:
<?php
use Symfony\Component\Console\Output\BufferedOutput;
use function Pest\Laravel\artisan;
use function Termwind\renderUsing;
beforeEach(fn() => renderUsing(new BufferedOutput()));
...and the output while tests are running is gone.
Thank you @xiCO2k!
Awesome 💪
If you really don't need the output, there's also Symfony\Component\Console\Output\NullOutput
.
Maybe it's a dumb question, but I didn't find any solutions.
Is it possible to disable termwind output when tests are running? Let's say there is a simple command which outputs text with
$this->info()
andrender()
:and a simple test (Pest):
When tests are running, "Green text" will not show, while "Red text" will. I think both should not be rendered while tests are running.
What's the best way to make
render()
behave like standard output functions?Thank you