Skip to content
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

[docs] changed react-testing-library package name to @testing-library/react #8753

Merged
merged 7 commits into from Jul 27, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
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
Expand Up @@ -37,6 +37,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
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
@@ -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
2 changes: 1 addition & 1 deletion examples/react-testing-library/package.json
Expand Up @@ -13,7 +13,7 @@
"@babel/preset-react": "*",
"babel-jest": "*",
"jest": "*",
"react-testing-library": "*"
"@testing-library/react": "*"
jdelucaa marked this conversation as resolved.
Show resolved Hide resolved
},
"scripts": {
"test": "jest"
Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-24.0/TutorialReact.md
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
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
50 changes: 29 additions & 21 deletions yarn.lock
Expand Up @@ -825,13 +825,20 @@
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":
"@babel/runtime@^7.0.0", "@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==
dependencies:
regenerator-runtime "^0.13.2"

"@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"

"@babel/template@^7.0.0", "@babel/template@^7.1.0", "@babel/template@^7.1.2", "@babel/template@^7.2.2":
version "7.2.2"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.2.2.tgz#005b3fdf0ed96e88041330379e0da9a708eb2907"
Expand Down Expand Up @@ -1699,6 +1706,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 @@ -2606,7 +2632,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 @@ -4950,16 +4976,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 @@ -11240,14 +11256,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 @@ -13527,7 +13535,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