From d96ddaeaac597afa6a9b2ade4cd4740d62d518a6 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Sun, 19 Mar 2023 03:51:27 +0000 Subject: [PATCH] feat: clarifies that profile is not supported in parallel --- composer.json | 1 + src/Plugins/Profile.php | 28 ++++++++++++++++++++++++++++ src/Plugins/Retry.php | 1 - 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 src/Plugins/Profile.php diff --git a/composer.json b/composer.json index d531b48c..6515d1f7 100644 --- a/composer.json +++ b/composer.json @@ -95,6 +95,7 @@ "Pest\\Plugins\\Memory", "Pest\\Plugins\\Printer", "Pest\\Plugins\\ProcessIsolation", + "Pest\\Plugins\\Profile", "Pest\\Plugins\\Retry", "Pest\\Plugins\\Version", "Pest\\Plugins\\Parallel" diff --git a/src/Plugins/Profile.php b/src/Plugins/Profile.php new file mode 100644 index 00000000..e29a7fc1 --- /dev/null +++ b/src/Plugins/Profile.php @@ -0,0 +1,28 @@ +hasArgument('--parallel', $arguments)) { + throw new InvalidOption('The [--profile] option is not supported when running in parallel.'); + } + + return $arguments; + } +} diff --git a/src/Plugins/Retry.php b/src/Plugins/Retry.php index 94b703e1..f5199381 100644 --- a/src/Plugins/Retry.php +++ b/src/Plugins/Retry.php @@ -23,7 +23,6 @@ final class Retry implements HandlesArguments return $arguments; } - // If running in parallel, we need to disable the retry plugin if ($this->hasArgument('--parallel', $arguments)) { throw new InvalidOption('The [--retry] option is not supported when running in parallel.'); }