Skip to content

Commit

Permalink
chore: adjusts K6 test
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Nov 5, 2023
1 parent 86ef0b0 commit 4603439
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions tests/Unit/Binary.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

0 comments on commit 4603439

Please sign in to comment.