Skip to content

Update cypress docs #222

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

Merged
merged 1 commit into from
Aug 17, 2019
Merged
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
20 changes: 4 additions & 16 deletions docs/cypress-testing-library/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,13 @@ import '@testing-library/cypress/add-commands';

## With typescript

Typings are defined under @testing-library/cypress/typings, and should be added
as follows in tsconfig.json:
Typings are defined in `@types/testing-library__cypress` at [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/testing-library__cypress),
and should be added as follows in `tsconfig.json`:

```json
{
"compilerOptions": {
"types": ["cypress", "../@testing-library/cypress/typings"]
}
}
```

or if tsconfig.json has a `baseUrl` of `../node_modules` as recommended in the
official Cypress documentation use:

```json
{
"compilerOptions": {
"types": ["cypress", "@testing-library/cypress/typings"]
"types": ["cypress", "@types/testing-library__cypress"]
}
}
```
Expand All @@ -52,8 +41,7 @@ and `queryAllBy` commands.

## Examples

You can find
[all Library definitions here](https://github.com/testing-library/cypress-testing-library/blob/master/typings/index.d.ts).
You can find [all Library definitions here](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/testing-library__cypress/index.d.ts).

To show some simple examples (from
[https://github.com/testing-library/cypress-testing-library/blob/master/cypress/integration/commands.spec.js](https://github.com/testing-library/cypress-testing-library/blob/master/cypress/integration/commands.spec.js)):
Expand Down