mirror of
https://github.com/pestphp/pest.git
synced 2026-03-12 02:37:22 +01:00
fix: update snapshot generation to strip time
This commit is contained in:
@ -353,3 +353,4 @@
|
|||||||
✓ depends run test only once
|
✓ depends run test only once
|
||||||
|
|
||||||
Tests: 6 skipped, 207 passed
|
Tests: 6 skipped, 207 passed
|
||||||
|
|
||||||
@ -17,7 +17,10 @@ test('visual snapshot of test suite on success', function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (getenv('REBUILD_SNAPSHOTS')) {
|
if (getenv('REBUILD_SNAPSHOTS')) {
|
||||||
file_put_contents($snapshot, $output());
|
// Strip time from end of snapshot
|
||||||
|
$outputContent = preg_replace('/Time\: \s+\d+\.\d+s\s+/m', '', $output());
|
||||||
|
|
||||||
|
file_put_contents($snapshot, $outputContent);
|
||||||
} elseif (!getenv('EXCLUDE')) {
|
} elseif (!getenv('EXCLUDE')) {
|
||||||
$output = explode("\n", $output());
|
$output = explode("\n", $output());
|
||||||
array_pop($output);
|
array_pop($output);
|
||||||
|
|||||||
Reference in New Issue
Block a user