From dd3564a841ea4e224ef3b94f987fb525aa933298 Mon Sep 17 00:00:00 2001 From: Jeffrey Fisher Date: Tue, 23 Aug 2022 17:49:56 -0700 Subject: [PATCH 1/2] docs: Update Enzyme links to use new URL --- docs/TutorialReact.md | 4 ++-- website/blog/2016-07-27-jest-14.md | 2 +- website/versioned_docs/version-25.x/TutorialReact.md | 4 ++-- website/versioned_docs/version-26.x/TutorialReact.md | 4 ++-- website/versioned_docs/version-27.x/TutorialReact.md | 4 ++-- website/versioned_docs/version-28.0/TutorialReact.md | 4 ++-- website/versioned_docs/version-28.1/TutorialReact.md | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/TutorialReact.md b/docs/TutorialReact.md index eeebb2936956..3f18ecbeab57 100644 --- a/docs/TutorialReact.md +++ b/docs/TutorialReact.md @@ -205,7 +205,7 @@ React 16 triggers these warnings due to how it checks element types, and the moc ### DOM Testing -If you'd like to assert, and manipulate your rendered components you can use [react-testing-library](https://github.com/kentcdodds/react-testing-library), [Enzyme](http://airbnb.io/enzyme/), or React's [TestUtils](https://reactjs.org/docs/test-utils.html). The following two examples use react-testing-library and Enzyme. +If you'd like to assert, and manipulate your rendered components you can use [react-testing-library](https://github.com/kentcdodds/react-testing-library), [Enzyme](https://enzymejs.github.io/enzyme/), or React's [TestUtils](https://reactjs.org/docs/test-utils.html). The following two examples use react-testing-library and Enzyme. #### react-testing-library @@ -265,7 +265,7 @@ npm install --save-dev enzyme If you are using a React version below 15.5.0, you will also need to install `react-addons-test-utils`. -Let's rewrite the test from above using Enzyme instead of react-testing-library. We use Enzyme's [shallow renderer](http://airbnb.io/enzyme/docs/api/shallow.html) in this example. +Let's rewrite the test from above using Enzyme instead of react-testing-library. We use Enzyme's [shallow renderer](https://enzymejs.github.io/enzyme/docs/api/shallow.html) in this example. ```tsx title="__tests__/CheckboxWithLabel-test.js" import Enzyme, {shallow} from 'enzyme'; diff --git a/website/blog/2016-07-27-jest-14.md b/website/blog/2016-07-27-jest-14.md index 837b8ab172af..79babd8fd57c 100644 --- a/website/blog/2016-07-27-jest-14.md +++ b/website/blog/2016-07-27-jest-14.md @@ -7,7 +7,7 @@ authorFBID: 100000023028168 One of Jest's philosophies is to provide an integrated “zero-configuration” experience. We want to make it as frictionless as possible to write good tests that are useful. We observed that when engineers are provided with ready-to-use tools, they end up writing more tests, which in turn results in stable and healthy code bases. -One of the big open questions was how to write React tests efficiently. There are plenty of tools such as [ReactTestUtils](https://facebook.github.io/react/docs/test-utils.html) and [enzyme](http://airbnb.io/enzyme/). Both of these tools are great and are actively being used. However engineers frequently told us that they spend more time writing a test than the component itself. As a result many people stopped writing tests altogether which eventually led to instabilities. Engineers told us all they wanted was to make sure their components don't change unexpectedly. +One of the big open questions was how to write React tests efficiently. There are plenty of tools such as [ReactTestUtils](https://facebook.github.io/react/docs/test-utils.html) and [enzyme](https://enzymejs.github.io/enzyme/). Both of these tools are great and are actively being used. However engineers frequently told us that they spend more time writing a test than the component itself. As a result many people stopped writing tests altogether which eventually led to instabilities. Engineers told us all they wanted was to make sure their components don't change unexpectedly. diff --git a/website/versioned_docs/version-25.x/TutorialReact.md b/website/versioned_docs/version-25.x/TutorialReact.md index 861e716ed6ff..a9713d24ba88 100644 --- a/website/versioned_docs/version-25.x/TutorialReact.md +++ b/website/versioned_docs/version-25.x/TutorialReact.md @@ -196,7 +196,7 @@ React 16 triggers these warnings due to how it checks element types, and the moc ### DOM Testing -If you'd like to assert, and manipulate your rendered components you can use [react-testing-library](https://github.com/kentcdodds/react-testing-library), [Enzyme](http://airbnb.io/enzyme/), or React's [TestUtils](https://reactjs.org/docs/test-utils.html). The following two examples use react-testing-library and Enzyme. +If you'd like to assert, and manipulate your rendered components you can use [react-testing-library](https://github.com/kentcdodds/react-testing-library), [Enzyme](https://enzymejs.github.io/enzyme/), or React's [TestUtils](https://reactjs.org/docs/test-utils.html). The following two examples use react-testing-library and Enzyme. #### react-testing-library @@ -253,7 +253,7 @@ The code for this example is available at [examples/react-testing-library](https You have to run `yarn add --dev enzyme` to use Enzyme. If you are using a React version below 15.5.0, you will also need to install `react-addons-test-utils`. -Let's rewrite the test from above using Enzyme instead of react-testing-library. We use Enzyme's [shallow renderer](http://airbnb.io/enzyme/docs/api/shallow.html) in this example. +Let's rewrite the test from above using Enzyme instead of react-testing-library. We use Enzyme's [shallow renderer](https://enzymejs.github.io/enzyme/docs/api/shallow.html) in this example. ```tsx title="__tests__/CheckboxWithLabel-test.js" import React from 'react'; diff --git a/website/versioned_docs/version-26.x/TutorialReact.md b/website/versioned_docs/version-26.x/TutorialReact.md index 861e716ed6ff..a9713d24ba88 100644 --- a/website/versioned_docs/version-26.x/TutorialReact.md +++ b/website/versioned_docs/version-26.x/TutorialReact.md @@ -196,7 +196,7 @@ React 16 triggers these warnings due to how it checks element types, and the moc ### DOM Testing -If you'd like to assert, and manipulate your rendered components you can use [react-testing-library](https://github.com/kentcdodds/react-testing-library), [Enzyme](http://airbnb.io/enzyme/), or React's [TestUtils](https://reactjs.org/docs/test-utils.html). The following two examples use react-testing-library and Enzyme. +If you'd like to assert, and manipulate your rendered components you can use [react-testing-library](https://github.com/kentcdodds/react-testing-library), [Enzyme](https://enzymejs.github.io/enzyme/), or React's [TestUtils](https://reactjs.org/docs/test-utils.html). The following two examples use react-testing-library and Enzyme. #### react-testing-library @@ -253,7 +253,7 @@ The code for this example is available at [examples/react-testing-library](https You have to run `yarn add --dev enzyme` to use Enzyme. If you are using a React version below 15.5.0, you will also need to install `react-addons-test-utils`. -Let's rewrite the test from above using Enzyme instead of react-testing-library. We use Enzyme's [shallow renderer](http://airbnb.io/enzyme/docs/api/shallow.html) in this example. +Let's rewrite the test from above using Enzyme instead of react-testing-library. We use Enzyme's [shallow renderer](https://enzymejs.github.io/enzyme/docs/api/shallow.html) in this example. ```tsx title="__tests__/CheckboxWithLabel-test.js" import React from 'react'; diff --git a/website/versioned_docs/version-27.x/TutorialReact.md b/website/versioned_docs/version-27.x/TutorialReact.md index 8fa282fff661..851df50953d3 100644 --- a/website/versioned_docs/version-27.x/TutorialReact.md +++ b/website/versioned_docs/version-27.x/TutorialReact.md @@ -196,7 +196,7 @@ React 16 triggers these warnings due to how it checks element types, and the moc ### DOM Testing -If you'd like to assert, and manipulate your rendered components you can use [react-testing-library](https://github.com/kentcdodds/react-testing-library), [Enzyme](http://airbnb.io/enzyme/), or React's [TestUtils](https://reactjs.org/docs/test-utils.html). The following two examples use react-testing-library and Enzyme. +If you'd like to assert, and manipulate your rendered components you can use [react-testing-library](https://github.com/kentcdodds/react-testing-library), [Enzyme](https://enzymejs.github.io/enzyme/), or React's [TestUtils](https://reactjs.org/docs/test-utils.html). The following two examples use react-testing-library and Enzyme. #### react-testing-library @@ -253,7 +253,7 @@ The code for this example is available at [examples/react-testing-library](https You have to run `yarn add --dev enzyme` to use Enzyme. If you are using a React version below 15.5.0, you will also need to install `react-addons-test-utils`. -Let's rewrite the test from above using Enzyme instead of react-testing-library. We use Enzyme's [shallow renderer](http://airbnb.io/enzyme/docs/api/shallow.html) in this example. +Let's rewrite the test from above using Enzyme instead of react-testing-library. We use Enzyme's [shallow renderer](https://enzymejs.github.io/enzyme/docs/api/shallow.html) in this example. ```tsx title="__tests__/CheckboxWithLabel-test.js" import React from 'react'; diff --git a/website/versioned_docs/version-28.0/TutorialReact.md b/website/versioned_docs/version-28.0/TutorialReact.md index eeebb2936956..3f18ecbeab57 100644 --- a/website/versioned_docs/version-28.0/TutorialReact.md +++ b/website/versioned_docs/version-28.0/TutorialReact.md @@ -205,7 +205,7 @@ React 16 triggers these warnings due to how it checks element types, and the moc ### DOM Testing -If you'd like to assert, and manipulate your rendered components you can use [react-testing-library](https://github.com/kentcdodds/react-testing-library), [Enzyme](http://airbnb.io/enzyme/), or React's [TestUtils](https://reactjs.org/docs/test-utils.html). The following two examples use react-testing-library and Enzyme. +If you'd like to assert, and manipulate your rendered components you can use [react-testing-library](https://github.com/kentcdodds/react-testing-library), [Enzyme](https://enzymejs.github.io/enzyme/), or React's [TestUtils](https://reactjs.org/docs/test-utils.html). The following two examples use react-testing-library and Enzyme. #### react-testing-library @@ -265,7 +265,7 @@ npm install --save-dev enzyme If you are using a React version below 15.5.0, you will also need to install `react-addons-test-utils`. -Let's rewrite the test from above using Enzyme instead of react-testing-library. We use Enzyme's [shallow renderer](http://airbnb.io/enzyme/docs/api/shallow.html) in this example. +Let's rewrite the test from above using Enzyme instead of react-testing-library. We use Enzyme's [shallow renderer](https://enzymejs.github.io/enzyme/docs/api/shallow.html) in this example. ```tsx title="__tests__/CheckboxWithLabel-test.js" import Enzyme, {shallow} from 'enzyme'; diff --git a/website/versioned_docs/version-28.1/TutorialReact.md b/website/versioned_docs/version-28.1/TutorialReact.md index eeebb2936956..3f18ecbeab57 100644 --- a/website/versioned_docs/version-28.1/TutorialReact.md +++ b/website/versioned_docs/version-28.1/TutorialReact.md @@ -205,7 +205,7 @@ React 16 triggers these warnings due to how it checks element types, and the moc ### DOM Testing -If you'd like to assert, and manipulate your rendered components you can use [react-testing-library](https://github.com/kentcdodds/react-testing-library), [Enzyme](http://airbnb.io/enzyme/), or React's [TestUtils](https://reactjs.org/docs/test-utils.html). The following two examples use react-testing-library and Enzyme. +If you'd like to assert, and manipulate your rendered components you can use [react-testing-library](https://github.com/kentcdodds/react-testing-library), [Enzyme](https://enzymejs.github.io/enzyme/), or React's [TestUtils](https://reactjs.org/docs/test-utils.html). The following two examples use react-testing-library and Enzyme. #### react-testing-library @@ -265,7 +265,7 @@ npm install --save-dev enzyme If you are using a React version below 15.5.0, you will also need to install `react-addons-test-utils`. -Let's rewrite the test from above using Enzyme instead of react-testing-library. We use Enzyme's [shallow renderer](http://airbnb.io/enzyme/docs/api/shallow.html) in this example. +Let's rewrite the test from above using Enzyme instead of react-testing-library. We use Enzyme's [shallow renderer](https://enzymejs.github.io/enzyme/docs/api/shallow.html) in this example. ```tsx title="__tests__/CheckboxWithLabel-test.js" import Enzyme, {shallow} from 'enzyme'; From 61b3180dd77b3385f99c460ca60f08b5a4dfe52c Mon Sep 17 00:00:00 2001 From: Jeffrey Fisher Date: Tue, 23 Aug 2022 18:20:49 -0700 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60c206aee52e..f596e205a22e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ - `[*]` [**BREAKING**] Drop support for Node v12 and v17 ([#13033](https://github.com/facebook/jest/pull/13033)) - `[docs]` Fix webpack name ([#13049](https://github.com/facebook/jest/pull/13049)) - `[docs]` Explicit how to set `n` for `--bail` ([#13128](https://github.com/facebook/jest/pull/13128)) +- `[docs]` Update Enzyme URL ([#13166](https://github.com/facebook/jest/pull/13166)) - `[jest-leak-detector]` Remove support for `weak-napi` ([#13035](https://github.com/facebook/jest/pull/13035)) - `[jest-snapshot]` [**BREAKING**] Require `rootDir` as argument to `SnapshotState` ([#13150](https://github.com/facebook/jest/pull/13150))