Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: mention Jest Puppeteer Preset #5722

Merged
merged 1 commit into from
Mar 5, 2018
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
([#5648](https://github.com/facebook/jest/pull/5708))
* `[docs]` Add docs on using `jest.mock(...)`
([#5648](https://github.com/facebook/jest/pull/5648))
* `[docs]` Mention Jest Puppeteer Preset
([#5722](https://github.com/facebook/jest/pull/5722))

## 22.4.2

Expand Down
23 changes: 22 additions & 1 deletion docs/Puppeteer.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,28 @@ With the [Global Setup/Teardown](Configuration.md#globalsetup-string) and
[Async Test Environment](Configuration.md#testenvironment-string) APIs, Jest can
work smoothly with [puppeteer](https://github.com/GoogleChrome/puppeteer).

## A jest-puppeteer example
## Use Puppeteer Preset

[Jest Puppeteer Preset](https://github.com/smooth-code/jest-puppeteer) provides
all required configuration to run your tests using Puppeteer.

1. First install `jest-puppeteer-preset`

```
yarn add --dev jest-puppeteer-preset
```

2. Specify preset in your Jest configuration:

```json
{
"preset": "jest-puppeteer-preset"
}
```

See [documentation](https://github.com/smooth-code/jest-puppeteer).

## Custom example

The basic idea is to:

Expand Down