From 2853e09e4de94850d4542b1ea508a8f627a457a2 Mon Sep 17 00:00:00 2001 From: Simon Jespersen Date: Sat, 17 Aug 2019 19:56:50 +0200 Subject: [PATCH] Update cypress docs --- docs/cypress-testing-library/intro.md | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/docs/cypress-testing-library/intro.md b/docs/cypress-testing-library/intro.md index 45d272f10..7f8cc29ea 100644 --- a/docs/cypress-testing-library/intro.md +++ b/docs/cypress-testing-library/intro.md @@ -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"] } } ``` @@ -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)):