Skip to content

Commit

Permalink
docs(readme): document setupTestFrameworkScriptFile
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed Nov 3, 2018
1 parent 5aee5fe commit ba06133
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,25 @@ module.exports = {
}
```

### Specify a `setupTestFrameworkScriptFile`

Jest Puppeteer use `expect-puppeteer` as `setupTestFrameworkScriptFile`. If you want to use `expect-puppeteer` don't forget to add it in your custom `setupTestFrameworkScriptFile`:

```js
// setupTestFrameworkScriptFile.js
require('expect-puppeteer')

// Your custom setup
```

```js
// jest.config.js
module.exports = {
// ...
setupTestFrameworkScriptFile: './setupTestFrameworkScriptFile.js',
}
```

### Extend `PuppeteerEnvironment`

Sometimes you want to use your own environment, to do that you can extend `PuppeteerEnvironment`.
Expand Down

0 comments on commit ba06133

Please sign in to comment.