From 2a07d5aea5c9c5e36b515470adfa2e1ca0a931c0 Mon Sep 17 00:00:00 2001 From: Robert Dyjas <15113729+robdy@users.noreply.github.com> Date: Mon, 17 Jan 2022 15:25:45 +0100 Subject: [PATCH 1/4] Fixes broken link in Snapshot Testing docs --- website/versioned_docs/version-27.4/SnapshotTesting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/versioned_docs/version-27.4/SnapshotTesting.md b/website/versioned_docs/version-27.4/SnapshotTesting.md index fa1639e2eebd..623198562a67 100644 --- a/website/versioned_docs/version-27.4/SnapshotTesting.md +++ b/website/versioned_docs/version-27.4/SnapshotTesting.md @@ -9,7 +9,7 @@ A typical snapshot test case renders a UI component, takes a snapshot, then comp ## Snapshot Testing with Jest -A similar approach can be taken when it comes to testing your React components. Instead of rendering the graphical UI, which would require building the entire app, you can use a test renderer to quickly generate a serializable value for your React tree. Consider this [example test](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/link.react.test.js) for a [Link component](https://github.com/facebook/jest/blob/main/examples/snapshot/Link.js): +A similar approach can be taken when it comes to testing your React components. Instead of rendering the graphical UI, which would require building the entire app, you can use a test renderer to quickly generate a serializable value for your React tree. Consider this [example test](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/link.test.js) for a [Link component](https://github.com/facebook/jest/blob/main/examples/snapshot/Link.js): ```tsx import React from 'react'; From 3d5d14beed8a3f35744661989e08bcac349be297 Mon Sep 17 00:00:00 2001 From: Robert Dyjas <15113729+robdy@users.noreply.github.com> Date: Mon, 17 Jan 2022 15:36:33 +0100 Subject: [PATCH 2/4] Fixes another link --- website/versioned_docs/version-27.4/SnapshotTesting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/versioned_docs/version-27.4/SnapshotTesting.md b/website/versioned_docs/version-27.4/SnapshotTesting.md index 623198562a67..d0ea09dfe4d7 100644 --- a/website/versioned_docs/version-27.4/SnapshotTesting.md +++ b/website/versioned_docs/version-27.4/SnapshotTesting.md @@ -24,7 +24,7 @@ it('renders correctly', () => { }); ``` -The first time this test is run, Jest creates a [snapshot file](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/__snapshots__/link.react.test.js.snap) that looks like this: +The first time this test is run, Jest creates a [snapshot file](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/__snapshots__/link.test.js.snap) that looks like this: ```javascript exports[`renders correctly 1`] = ` From 0eeb5140fa23de2ee68a8f7d0d8f2ad13ac5a760 Mon Sep 17 00:00:00 2001 From: Robert Dyjas <15113729+robdy@users.noreply.github.com> Date: Tue, 18 Jan 2022 14:53:56 +0100 Subject: [PATCH 3/4] Update link in versioned files --- docs/SnapshotTesting.md | 2 +- website/versioned_docs/version-26.x/SnapshotTesting.md | 4 ++-- website/versioned_docs/version-27.0/SnapshotTesting.md | 4 ++-- website/versioned_docs/version-27.1/SnapshotTesting.md | 4 ++-- website/versioned_docs/version-27.2/SnapshotTesting.md | 4 ++-- website/versioned_docs/version-27.4/SnapshotTesting.md | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/SnapshotTesting.md b/docs/SnapshotTesting.md index 73966e7f4d63..004ace393d13 100644 --- a/docs/SnapshotTesting.md +++ b/docs/SnapshotTesting.md @@ -24,7 +24,7 @@ it('renders correctly', () => { }); ``` -The first time this test is run, Jest creates a [snapshot file](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/__snapshots__/link.react.test.js.snap) that looks like this: +The first time this test is run, Jest creates a [snapshot file](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/__snapshots__/link.test.js.snap) that looks like this: ```javascript exports[`renders correctly 1`] = ` diff --git a/website/versioned_docs/version-26.x/SnapshotTesting.md b/website/versioned_docs/version-26.x/SnapshotTesting.md index 887232836dac..397843e35a5d 100644 --- a/website/versioned_docs/version-26.x/SnapshotTesting.md +++ b/website/versioned_docs/version-26.x/SnapshotTesting.md @@ -9,7 +9,7 @@ A typical snapshot test case renders a UI component, takes a snapshot, then comp ## Snapshot Testing with Jest -A similar approach can be taken when it comes to testing your React components. Instead of rendering the graphical UI, which would require building the entire app, you can use a test renderer to quickly generate a serializable value for your React tree. Consider this [example test](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/link.react.test.js) for a [Link component](https://github.com/facebook/jest/blob/main/examples/snapshot/Link.js): +A similar approach can be taken when it comes to testing your React components. Instead of rendering the graphical UI, which would require building the entire app, you can use a test renderer to quickly generate a serializable value for your React tree. Consider this [example test](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/link.test.js) for a [Link component](https://github.com/facebook/jest/blob/main/examples/snapshot/Link.js): ```tsx import React from 'react'; @@ -24,7 +24,7 @@ it('renders correctly', () => { }); ``` -The first time this test is run, Jest creates a [snapshot file](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/__snapshots__/link.react.test.js.snap) that looks like this: +The first time this test is run, Jest creates a [snapshot file](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/__snapshots__/link.test.js.snap) that looks like this: ```javascript exports[`renders correctly 1`] = ` diff --git a/website/versioned_docs/version-27.0/SnapshotTesting.md b/website/versioned_docs/version-27.0/SnapshotTesting.md index fa1639e2eebd..d0ea09dfe4d7 100644 --- a/website/versioned_docs/version-27.0/SnapshotTesting.md +++ b/website/versioned_docs/version-27.0/SnapshotTesting.md @@ -9,7 +9,7 @@ A typical snapshot test case renders a UI component, takes a snapshot, then comp ## Snapshot Testing with Jest -A similar approach can be taken when it comes to testing your React components. Instead of rendering the graphical UI, which would require building the entire app, you can use a test renderer to quickly generate a serializable value for your React tree. Consider this [example test](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/link.react.test.js) for a [Link component](https://github.com/facebook/jest/blob/main/examples/snapshot/Link.js): +A similar approach can be taken when it comes to testing your React components. Instead of rendering the graphical UI, which would require building the entire app, you can use a test renderer to quickly generate a serializable value for your React tree. Consider this [example test](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/link.test.js) for a [Link component](https://github.com/facebook/jest/blob/main/examples/snapshot/Link.js): ```tsx import React from 'react'; @@ -24,7 +24,7 @@ it('renders correctly', () => { }); ``` -The first time this test is run, Jest creates a [snapshot file](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/__snapshots__/link.react.test.js.snap) that looks like this: +The first time this test is run, Jest creates a [snapshot file](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/__snapshots__/link.test.js.snap) that looks like this: ```javascript exports[`renders correctly 1`] = ` diff --git a/website/versioned_docs/version-27.1/SnapshotTesting.md b/website/versioned_docs/version-27.1/SnapshotTesting.md index fa1639e2eebd..d0ea09dfe4d7 100644 --- a/website/versioned_docs/version-27.1/SnapshotTesting.md +++ b/website/versioned_docs/version-27.1/SnapshotTesting.md @@ -9,7 +9,7 @@ A typical snapshot test case renders a UI component, takes a snapshot, then comp ## Snapshot Testing with Jest -A similar approach can be taken when it comes to testing your React components. Instead of rendering the graphical UI, which would require building the entire app, you can use a test renderer to quickly generate a serializable value for your React tree. Consider this [example test](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/link.react.test.js) for a [Link component](https://github.com/facebook/jest/blob/main/examples/snapshot/Link.js): +A similar approach can be taken when it comes to testing your React components. Instead of rendering the graphical UI, which would require building the entire app, you can use a test renderer to quickly generate a serializable value for your React tree. Consider this [example test](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/link.test.js) for a [Link component](https://github.com/facebook/jest/blob/main/examples/snapshot/Link.js): ```tsx import React from 'react'; @@ -24,7 +24,7 @@ it('renders correctly', () => { }); ``` -The first time this test is run, Jest creates a [snapshot file](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/__snapshots__/link.react.test.js.snap) that looks like this: +The first time this test is run, Jest creates a [snapshot file](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/__snapshots__/link.test.js.snap) that looks like this: ```javascript exports[`renders correctly 1`] = ` diff --git a/website/versioned_docs/version-27.2/SnapshotTesting.md b/website/versioned_docs/version-27.2/SnapshotTesting.md index fa1639e2eebd..d0ea09dfe4d7 100644 --- a/website/versioned_docs/version-27.2/SnapshotTesting.md +++ b/website/versioned_docs/version-27.2/SnapshotTesting.md @@ -9,7 +9,7 @@ A typical snapshot test case renders a UI component, takes a snapshot, then comp ## Snapshot Testing with Jest -A similar approach can be taken when it comes to testing your React components. Instead of rendering the graphical UI, which would require building the entire app, you can use a test renderer to quickly generate a serializable value for your React tree. Consider this [example test](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/link.react.test.js) for a [Link component](https://github.com/facebook/jest/blob/main/examples/snapshot/Link.js): +A similar approach can be taken when it comes to testing your React components. Instead of rendering the graphical UI, which would require building the entire app, you can use a test renderer to quickly generate a serializable value for your React tree. Consider this [example test](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/link.test.js) for a [Link component](https://github.com/facebook/jest/blob/main/examples/snapshot/Link.js): ```tsx import React from 'react'; @@ -24,7 +24,7 @@ it('renders correctly', () => { }); ``` -The first time this test is run, Jest creates a [snapshot file](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/__snapshots__/link.react.test.js.snap) that looks like this: +The first time this test is run, Jest creates a [snapshot file](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/__snapshots__/link.test.js.snap) that looks like this: ```javascript exports[`renders correctly 1`] = ` diff --git a/website/versioned_docs/version-27.4/SnapshotTesting.md b/website/versioned_docs/version-27.4/SnapshotTesting.md index d0ea09dfe4d7..f96256fc2ef3 100644 --- a/website/versioned_docs/version-27.4/SnapshotTesting.md +++ b/website/versioned_docs/version-27.4/SnapshotTesting.md @@ -9,7 +9,7 @@ A typical snapshot test case renders a UI component, takes a snapshot, then comp ## Snapshot Testing with Jest -A similar approach can be taken when it comes to testing your React components. Instead of rendering the graphical UI, which would require building the entire app, you can use a test renderer to quickly generate a serializable value for your React tree. Consider this [example test](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/link.test.js) for a [Link component](https://github.com/facebook/jest/blob/main/examples/snapshot/Link.js): +A similar approach can be taken when it comes to testing your React components. Instead of rendering the graphical UI, which would require building the entire app, you can use a test renderer to quickly generate a serializable value for your React tree. Consider this [example test](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/link.test.jsa [Link component](https://github.com/facebook/jest/blob/main/examples/snapshot/Link.js): ```tsx import React from 'react'; From 9940ed5306d5aab81036bd95a95408dd28049222 Mon Sep 17 00:00:00 2001 From: Robert Dyjas <15113729+robdy@users.noreply.github.com> Date: Tue, 18 Jan 2022 14:56:41 +0100 Subject: [PATCH 4/4] Reverts unexpected change --- website/versioned_docs/version-27.4/SnapshotTesting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/versioned_docs/version-27.4/SnapshotTesting.md b/website/versioned_docs/version-27.4/SnapshotTesting.md index f96256fc2ef3..d0ea09dfe4d7 100644 --- a/website/versioned_docs/version-27.4/SnapshotTesting.md +++ b/website/versioned_docs/version-27.4/SnapshotTesting.md @@ -9,7 +9,7 @@ A typical snapshot test case renders a UI component, takes a snapshot, then comp ## Snapshot Testing with Jest -A similar approach can be taken when it comes to testing your React components. Instead of rendering the graphical UI, which would require building the entire app, you can use a test renderer to quickly generate a serializable value for your React tree. Consider this [example test](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/link.test.jsa [Link component](https://github.com/facebook/jest/blob/main/examples/snapshot/Link.js): +A similar approach can be taken when it comes to testing your React components. Instead of rendering the graphical UI, which would require building the entire app, you can use a test renderer to quickly generate a serializable value for your React tree. Consider this [example test](https://github.com/facebook/jest/blob/main/examples/snapshot/__tests__/link.test.js) for a [Link component](https://github.com/facebook/jest/blob/main/examples/snapshot/Link.js): ```tsx import React from 'react';