mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
Merge pull request #981 from salehhashemi1992/refactor/remove-ansi-sequences
[2.x] Refactor: Extract ANSI Escape Sequence Removal to a Function
This commit is contained in:
@ -11,9 +11,7 @@ $run = function (string $target, bool $parallel) {
|
||||
|
||||
expect($process->getExitCode())->toBe(0);
|
||||
|
||||
$outputContent = preg_replace('#\\x1b[[][^A-Za-z]*[A-Za-z]#', '', $process->getOutput());
|
||||
|
||||
return $outputContent;
|
||||
return removeAnsiEscapeSequences($process->getOutput());
|
||||
};
|
||||
|
||||
$snapshot = function ($name) {
|
||||
|
||||
Reference in New Issue
Block a user