Skip to content

Commit

Permalink
feat: Don't bundle axe-core (#69)
Browse files Browse the repository at this point in the history
This allows consumers to use their own version of axe-core and significantly reduces the installation size. Also allow any 3.x or 4.x versions of axe-core in peer dependencies.

Closes #65, closes #59
  • Loading branch information
sapegin authored Oct 27, 2020
1 parent e3e2717 commit 71e3a50
Show file tree
Hide file tree
Showing 5 changed files with 1,523 additions and 8,446 deletions.
22 changes: 8 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,29 @@

[![npm](https://img.shields.io/npm/v/cypress-axe.svg)](https://www.npmjs.com/package/cypress-axe)

This package provides three simple [Cypress](https://cypress.io) commands to help test your applications for accessibility issues using [axe-core](https://github.com/dequelabs/axe-core).
Test accessibility with [axe-core](https://github.com/dequelabs/axe-core) in [Cypress](https://cypress.io).

## Install and configure
## Installation

### Add as a dev dependency:
1. **Install `cypress-axe` from npm:**

```sh
npm i -D cypress-axe
npm install --save-dev cypress-axe
```

### Install peer dependencies:
2. **Install peer dependencies:**

```sh
npm i -D cypress
npm install --save-dev cypress axe-core
```

**NOTE:** _axe-core is now bundled and doesn't need to be installed as a peer dependency_

### Include the commands

Update `Cypress/support/index.js` file to include the cypress-axe commands by adding:
3. **Include the commands.** Update `cypress/support/index.js` file to include the cypress-axe commands by adding:

```js
import 'cypress-axe'
```

### Add a task to log the messages to the terminal when the cypress executes the spec files

[Example - configuring log task](https://docs.cypress.io/api/commands/task.html#Usage)
4. **Add a task to log the messages to the terminal** when Cypress executes the spec files. [Example - configuring log task](https://docs.cypress.io/api/commands/task.html#Usage).

## Commands

Expand Down
Loading

0 comments on commit 71e3a50

Please sign in to comment.