Skip to content

Commit

Permalink
docs: add simple usage instructions (#4)
Browse files Browse the repository at this point in the history
* simple usage instructions

* Update README.md
  • Loading branch information
ZakTax authored and Kent C. Dodds committed May 3, 2018
1 parent e386c14 commit adf3d83
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@

## The problem

// TODO
You want to use [`dom-testing-library`][dom-testing-library] methods in your Cypress tests.

## This solution

// TODO
This allows you to use all the useful [`dom-testing-library`][dom-testing-library] methods in your tests.

## Table of Contents

Expand Down Expand Up @@ -60,11 +60,15 @@ npm install --save-dev cypress-testing-library

## Usage

// TODO
`cypress-testing-library` extends Cypress' `cy` command.

## Inspiration
Add this line to your project's `cypress/support/commands.js`:

// TODO
```
import 'cypress-testing-library/add-commands';
```

You can now use all of `dom-testing-library`'s `getBy` and `getAllBy` commands. [See `dom-testing-library` repo for reference](https://github.com/kentcdodds/dom-testing-library#usage)

## Other Solutions

Expand Down Expand Up @@ -115,3 +119,4 @@ MIT
[twitter-badge]: https://img.shields.io/twitter/url/https/github.com/kentcdodds/cypress-testing-library.svg?style=social
[emojis]: https://github.com/kentcdodds/all-contributors#emoji-key
[all-contributors]: https://github.com/kentcdodds/all-contributors
[dom-testing-library]: https://github.com/kentcdodds/dom-testing-library

0 comments on commit adf3d83

Please sign in to comment.