Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nodejs/docs/api/class-test.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ test('Safari-only test 2', async ({ page }) => {
});
```

You can also call `test.skip()` without arguments inside the test body to always mark the test as failed. We recommend using `test.skip(title, body)` instead.
You can also call `test.skip()` without arguments inside the test body to always skip the test. However, we recommend using `test.skip(title, body)` instead.

```js
import { test, expect } from '@playwright/test';
Expand Down Expand Up @@ -1273,10 +1273,10 @@ test('less readable', async ({ page }) => {
Test body that takes one or two arguments: an object with fixtures and optional [TestInfo].
- `condition` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="test-skip-option-condition"/><a href="#test-skip-option-condition" class="list-anchor">#</a>

Test is marked as "should fail" when the condition is `true`.
Test is marked as "skipped" when the condition is `true`.
- `callback` [function]\([Fixtures]\):[boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="test-skip-option-callback"/><a href="#test-skip-option-callback" class="list-anchor">#</a>

A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as "should fail" when the return value is `true`.
A function that returns whether to mark as "skipped", based on test fixtures. Test or tests are marked as "skipped" when the return value is `true`.
- `description` [string] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="test-skip-option-description"/><a href="#test-skip-option-description" class="list-anchor">#</a>

Optional description that will be reflected in a test report.
Expand Down
Loading