Removes isInParallel

This commit is contained in:
luke
2021-08-13 10:14:01 +01:00
parent 45e76a6df6
commit 03d34e9a10
9 changed files with 8 additions and 50 deletions

View File

@ -1,14 +1,13 @@
<?php
use Pest\Support\Str;
use Pest\TestSuite;
global $globalHook;
// HACK: we have to determine our $globalHook->calls baseline. This is because
// two other tests are executed before this one due to filename ordering.
$args = $_SERVER['argv'] ?? [];
$single = (isset($args[1]) && Str::endsWith(__FILE__, $args[1])) || TestSuite::getInstance()->isInParallel;
$single = (isset($args[1]) && Str::endsWith(__FILE__, $args[1])) || ($_SERVER['PEST_PARALLEL'] ?? false);
$offset = $single ? 0 : 2;
uses()->beforeAll(function () use ($globalHook, $offset) {