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:
Nuno Maduro
2024-01-25 14:11:51 +00:00
committed by GitHub
7 changed files with 19 additions and 8 deletions

View File

@ -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) {