Skip to content

Commit

Permalink
[docs] changed react-testing-library package name to @testing-library…
Browse files Browse the repository at this point in the history
…/react (#8753)
  • Loading branch information
jdelucaa authored and SimenB committed Jul 27, 2019
1 parent f440ded commit 8902dbe
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:
- run: *install
- save-cache: *save-cache
- run:
# react-native does not work with node 6
command: rm -rf examples/react-native && yarn test-ci-partial
# react-native and react-testing-library do not work with node 6
command: rm -rf examples/react-native examples/react-testing-library && yarn test-ci-partial
- store_test_results:
path: reports/junit

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
- `[docs]` Add information about using `jest.doMock` with ES6 imports ([#8573](https://github.com/facebook/jest/pull/8573))
- `[docs]` Fix variable name in custom-matcher-api code example ([#8582](https://github.com/facebook/jest/pull/8582))
- `[docs]` Fix example used in custom environment docs ([#8617](https://github.com/facebook/jest/pull/8617))
- `[docs]` Updated react tutorial to refer to new package of react-testing-library (@testing-library/react) ([#8753](https://github.com/facebook/jest/pull/8753))
- `[jest-core]` Add `getVersion` (moved from `jest-cli`) ([#8706](https://github.com/facebook/jest/pull/8706))

### Performance
Expand Down
2 changes: 1 addition & 1 deletion docs/TutorialReact.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ If you'd like to assert, and manipulate your rendered components you can use [re

#### react-testing-library

You have to run `yarn add --dev react-testing-library` to use react-testing-library.
You have to run `yarn add --dev @testing-library/react` to use react-testing-library.

Let's implement a simple checkbox which swaps between two labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2004-present Facebook. All Rights Reserved.

import React from 'react';
import {render, fireEvent, cleanup} from 'react-testing-library';
import {render, fireEvent, cleanup} from '@testing-library/react';
import CheckboxWithLabel from '../CheckboxWithLabel';

// automatically unmount and cleanup DOM after the test is finished.
Expand Down
4 changes: 2 additions & 2 deletions examples/react-testing-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"@babel/plugin-proposal-class-properties": "*",
"@babel/preset-env": "*",
"@babel/preset-react": "*",
"@testing-library/react": "*",
"babel-jest": "*",
"jest": "*",
"react-testing-library": "*"
"jest": "*"
},
"scripts": {
"test": "jest"
Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-24.0/TutorialReact.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ If you'd like to assert, and manipulate your rendered components you can use [re

#### react-testing-library

You have to run `yarn add --dev react-testing-library` to use react-testing-library.
You have to run `yarn add --dev @testing-library/react` to use react-testing-library.

Let's implement a simple checkbox which swaps between two labels:
Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-24.8/TutorialReact.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ If you'd like to assert, and manipulate your rendered components you can use [re

#### react-testing-library

You have to run `yarn add --dev react-testing-library` to use react-testing-library.
You have to run `yarn add --dev @testing-library/react` to use react-testing-library.

Let's implement a simple checkbox which swaps between two labels:
Expand Down
49 changes: 25 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1217,10 +1217,10 @@
pirates "^4.0.0"
source-map-support "^0.5.9"

"@babel/runtime@^7.0.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.3", "@babel/runtime@^7.4.5":
version "7.5.4"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.5.4.tgz#cb7d1ad7c6d65676e66b47186577930465b5271b"
integrity sha512-Na84uwyImZZc3FKf4aUF1tysApzwf3p2yuFBIyBfbzT5glzKTdvYI4KVW4kcgjrzoGUjC7w3YyCHcJKaRxsr2Q==
"@babel/runtime@^7.0.0", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.4":
version "7.5.5"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.5.5.tgz#74fba56d35efbeca444091c7850ccd494fd2f132"
integrity sha512-28QvEGyQyNkB0/m2B4FU7IEZGK2NUrcMtT6BZEFALTguLk+AUT6ofsHtPk5QyjAdUkpMJ+/Em+quwz4HOt30AQ==
dependencies:
regenerator-runtime "^0.13.2"

Expand Down Expand Up @@ -2124,6 +2124,25 @@
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd"
integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==

"@testing-library/dom@^5.5.4":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-5.6.0.tgz#18a7c162a6a79964e731ad7b810022a28218047c"
integrity sha512-nAsRvQLr/b6TGNjuHMEbWXCNPLrQYnzqa/KKQZL7wBOtfptUxsa4Ah9aqkHW0ZmCSFmUDj4nFUxWPVTeMu0iCw==
dependencies:
"@babel/runtime" "^7.4.5"
"@sheerun/mutationobserver-shim" "^0.3.2"
aria-query "3.0.0"
pretty-format "^24.8.0"
wait-for-expect "^1.2.0"

"@testing-library/react@*":
version "8.0.7"
resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-8.0.7.tgz#b5992c9156e926850a0e3a7c882ae1aed83b1c77"
integrity sha512-6XoeWSr3UCdxMswbkW0BmuXYw8a6w+stt+5gg4D4zAcljfhXETQ5o28bjJFwNab4OPg8gBNK8KIVot86L4Q8Vg==
dependencies:
"@babel/runtime" "^7.5.4"
"@testing-library/dom" "^5.5.4"

"@types/ansi-escapes@^3.0.0", "@types/ansi-escapes@^3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@types/ansi-escapes/-/ansi-escapes-3.0.1.tgz#328e46c6ac3177ca4cf2efdeed326cf77da01ef7"
Expand Down Expand Up @@ -3031,7 +3050,7 @@ argv@^0.0.2:
resolved "https://registry.yarnpkg.com/argv/-/argv-0.0.2.tgz#ecbd16f8949b157183711b1bda334f37840185ab"
integrity sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas=

aria-query@^3.0.0:
aria-query@3.0.0, aria-query@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-3.0.0.tgz#65b3fcc1ca1155a8c9ae64d6eee297f15d5133cc"
integrity sha1-ZbP8wcoRVajJrmTW7uKX8V1RM8w=
Expand Down Expand Up @@ -5407,16 +5426,6 @@ dom-serializer@0, dom-serializer@~0.1.0, dom-serializer@~0.1.1:
domelementtype "^1.3.0"
entities "^1.1.1"

dom-testing-library@^3.13.1:
version "3.19.4"
resolved "https://registry.yarnpkg.com/dom-testing-library/-/dom-testing-library-3.19.4.tgz#f5b737f59ee9749a4568fa353f1f59be97c888c3"
integrity sha512-GJOx8CLpnkvM3takILOsld/itUUc9+7Qh6caN1Spj6+9jIgNPY36fsvoH7sEgYokC0lBRdttO7G7fIFYCXlmcA==
dependencies:
"@babel/runtime" "^7.4.3"
"@sheerun/mutationobserver-shim" "^0.3.2"
pretty-format "^24.7.0"
wait-for-expect "^1.1.1"

dom-walk@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018"
Expand Down Expand Up @@ -11759,14 +11768,6 @@ react-test-renderer@*, react-test-renderer@^16.0.0-0:
react-is "^16.8.6"
scheduler "^0.13.6"

react-testing-library@*:
version "6.0.0"
resolved "https://registry.yarnpkg.com/react-testing-library/-/react-testing-library-6.0.0.tgz#81edfcfae8a795525f48685be9bf561df45bb35d"
integrity sha512-h0h+YLe4KWptK6HxOMnoNN4ngu3W8isrwDmHjPC5gxc+nOZOCurOvbKVYCvvuAw91jdO7VZSm/5KR7TxKnz0qA==
dependencies:
"@babel/runtime" "^7.3.1"
dom-testing-library "^3.13.1"

react-transform-hmr@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/react-transform-hmr/-/react-transform-hmr-1.0.4.tgz#e1a40bd0aaefc72e8dfd7a7cda09af85066397bb"
Expand Down Expand Up @@ -14036,7 +14037,7 @@ w3c-hr-time@^1.0.1:
dependencies:
browser-process-hrtime "^0.1.2"

wait-for-expect@^1.1.1:
wait-for-expect@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/wait-for-expect/-/wait-for-expect-1.2.0.tgz#fdab6a26e87d2039101db88bff3d8158e5c3e13f"
integrity sha512-EJhKpA+5UHixduMBEGhTFuLuVgQBKWxkFbefOdj2bbk2/OpA5Opsc4aUTGmF+qJ+v3kTGxDRNYwKaT4j6g5n8Q==
Expand Down

0 comments on commit 8902dbe

Please sign in to comment.