Skip to content

Commit 93f73ad

Browse files
committed
Add information about skip to readme
1 parent cce2727 commit 93f73ad

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,23 @@ npx nyc report --reporter=html
202202

203203
which will create a HTML website in the `coverage` directory.
204204

205+
## Skip tests for specific browser and device
206+
207+
It's possible to skip tests for browser or combination of browser and device
208+
209+
```js
210+
jestPlaywright.skip({ browser: 'chromium' }, () => {
211+
test('should skip this one', async () => {
212+
const title = await page.title()
213+
expect(title).toBe('Google')
214+
})
215+
216+
test('and this one', () => {
217+
expect(1).toBe(2)
218+
})
219+
})
220+
```
221+
205222
## Start a server
206223

207224
Jest Playwright integrates a functionality to start a server when running your test suite, like [jest-puppeteer](https://github.com/smooth-code/jest-puppeteer/blob/master/README.md#start-a-server). It automatically closes the server when tests are done.

0 commit comments

Comments
 (0)