Skip to content

Commit

Permalink
Update puppeteer (#640)
Browse files Browse the repository at this point in the history
I realized that @axe-core/puppeteer comes with its own version of axe-core so it is not necessary for users to directly install axe-core.
  • Loading branch information
calebeby committed Jan 31, 2023
1 parent d83f32b commit 893d9d5
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 98 deletions.
5 changes: 5 additions & 0 deletions .changeset/tall-brooms-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'pleasantest': minor
---

Bump puppeteer and @axe-core/puppeteer versions
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ test(
);
```

To pass variables from the test environment into the browser, you can pass them in an array as the 2nd parameter. Note that they must either be JSON-serializable or they can be a [`JSHandle`](https://pptr.dev/api/puppeteer.jshandle) or an [`ElementHandle`](https://pptr.dev/#?product=Puppeteer&version=v13.0.0&show=api-class-elementhandle). The arguments will be received in the browser via `import.meta.pleasantestArgs`:
To pass variables from the test environment into the browser, you can pass them in an array as the 2nd parameter. Note that they must either be JSON-serializable or they can be a [`JSHandle`](https://pptr.dev/api/puppeteer.jshandle) or an [`ElementHandle`](https://pptr.dev/api/puppeteer.elementhandle/). The arguments will be received in the browser via `import.meta.pleasantestArgs`:

```js
import { withBrowser } from 'pleasantest';
Expand Down Expand Up @@ -935,7 +935,7 @@ test(

This assertion, based on [`jest-puppeteer-axe`](https://github.com/WordPress/gutenberg/tree/3b2eccc289cfc90bd99252b12fc4c6e470ce4c04/packages/jest-puppeteer-axe), allows you to check a page using the [axe accessibility linter](https://github.com/dequelabs/axe-core).

To use this assertion, you **must install `@axe-core/puppeteer` and `axe-core`**. They are optional peer dependencies for Pleasantest, but are needed for the `toPassAxeTests` assertion.
To use this assertion, you **must install `@axe-core/puppeteer`**. It is listed as an optional peer dependency for Pleasantest, but it is necessary for the `toPassAxeTests` assertion.

```js
test(
Expand Down
Loading

0 comments on commit 893d9d5

Please sign in to comment.