diff --git a/tests/Unit/Binary.php b/tests/Unit/Binary.php index 1c4d7be..74e357c 100644 --- a/tests/Unit/Binary.php +++ b/tests/Unit/Binary.php @@ -4,8 +4,18 @@ use Pest\Stressless\ValueObjects\Binary; -it('infers the path from the environment', function (): void { +it('infers the path from the environment on mac OS', function (): void { $binary = Binary::k6(); - expect((string) $binary)->toBe(realpath(__DIR__.'/../../bin/k6-macos-arm64')); -}); + $arch = str_contains(php_uname('m'), 'arm') ? 'arm64' : 'amd64'; + + expect((string) $binary)->toBe(realpath(__DIR__.'/../../bin/k6-macos-'. $arch)); +})->skipOnLinux()->skipOnWindows(); + +it('infers the path from the environment on Linux', function (): void { + $binary = Binary::k6(); + + $arch = str_contains(php_uname('m'), 'arm') ? 'arm64' : 'amd64'; + + expect((string) $binary)->toBe(realpath(__DIR__.'/../../bin/k6-linux-'. $arch)); +})->skipOnMac()->skipOnWindows();