Skip to content

Commit

Permalink
Normalize snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc45 committed Dec 13, 2024
1 parent e6ac4d1 commit 21f4f83
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions _tests/custom_tests/tests/Traits/SnapshotHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ public function assertMatchesNormalizedSnapshot( string $actual, ?\Spatie\Snapsh
$actual = str_replace( '/tmp/', '/tmp-normalized/', $actual );
$actual = preg_replace( '/qit-results-[a-z0-9]+/', 'qit-results-normalizedid', $actual );
$actual = preg_replace( '/qit-env-[a-f0-9]{32}\.json/', 'qit-env-<hash>.json', $actual );
// Remove all Docker pull-related lines regardless of image name
$actual = preg_replace(
'/^(?:Unable to find image .*?locally|.*Pulling fs layer.*|.*Verifying Checksum.*|.*Download complete.*|.*Pull complete.*|Digest:.*|Status: Downloaded newer image for .*?)\r?\n/m',
'',
$actual
);

if ( empty( getenv( 'TEST_TOKEN' ) ) ) {
$actual = preg_replace(
Expand Down

0 comments on commit 21f4f83

Please sign in to comment.