mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 02:07:23 +01:00
remove duration from success snapshot
This commit is contained in:
@ -767,4 +767,4 @@
|
|||||||
PASS Tests\Visual\Version
|
PASS Tests\Visual\Version
|
||||||
✓ visual snapshot of help command output
|
✓ visual snapshot of help command output
|
||||||
|
|
||||||
Tests: 4 incomplete, 1 todo, 18 skipped, 511 passed (1286 assertions)
|
Tests: 4 incomplete, 1 todo, 18 skipped, 511 passed (1286 assertions)
|
||||||
@ -27,10 +27,12 @@ test('visual snapshot of test suite on success', function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (getenv('REBUILD_SNAPSHOTS')) {
|
if (getenv('REBUILD_SNAPSHOTS')) {
|
||||||
// Strip time from end of snapshot
|
$outputContent = explode("\n", $output());
|
||||||
$outputContent = preg_replace('/Time\: \s+\d+\.\d+s\s+/m', '', $output());
|
array_pop($outputContent);
|
||||||
|
array_pop($outputContent);
|
||||||
|
array_pop($outputContent);
|
||||||
|
|
||||||
file_put_contents($snapshot, $outputContent);
|
file_put_contents($snapshot, implode("\n", $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