mirror of
https://github.com/pestphp/pest.git
synced 2026-03-12 02:37:22 +01:00
fix: avoids usage of --update-snapshots in parallel
This commit is contained in:
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Pest\Plugins;
|
namespace Pest\Plugins;
|
||||||
|
|
||||||
|
use Pest\Exceptions\InvalidOption;
|
||||||
use Pest\Contracts\Plugins\HandlesArguments;
|
use Pest\Contracts\Plugins\HandlesArguments;
|
||||||
use Pest\TestSuite;
|
use Pest\TestSuite;
|
||||||
|
|
||||||
@ -23,6 +24,10 @@ final class Snapshot implements HandlesArguments
|
|||||||
return $arguments;
|
return $arguments;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->hasArgument('--parallel', $arguments)) {
|
||||||
|
throw new InvalidOption('The [--update-snapshots] option is not supported when running in parallel.');
|
||||||
|
}
|
||||||
|
|
||||||
TestSuite::getInstance()->snapshots->flush();
|
TestSuite::getInstance()->snapshots->flush();
|
||||||
|
|
||||||
return $this->popArgument('--update-snapshots', $arguments);
|
return $this->popArgument('--update-snapshots', $arguments);
|
||||||
|
|||||||
Reference in New Issue
Block a user