Skip to content

Commit

Permalink
Merge pull request #243 from nahime0/onlyon-methods
Browse files Browse the repository at this point in the history
feat: onlyOn* methods
  • Loading branch information
nunomaduro authored Nov 22, 2023
2 parents 2109612 + 1c54f6e commit 1e3ffb8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions skipping-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ it('has home', function () {
})->skipOnWindows(); // or skipOnMac() or skipOnLinux() ...
```

Alternatively, you can skip a test on all operating systems except one by using `onlyOnWindows()`, `onlyOnMac()`, or `onlyOnLinux()`.

```php
it('has home', function() {
//
})->onlyOnWindows(); // or onlyOnMac() or onlyOnLinux() ...
```

You may even invoke the `skip()` method within your `beforeEach()` hook to conveniently skip an entire test file.

```php
Expand Down

0 comments on commit 1e3ffb8

Please sign in to comment.