Skip to content

Commit

Permalink
Add Jest to v2 migration docs (#8384)
Browse files Browse the repository at this point in the history
It would be helpful to include the required Jest updates in the migration guide. We were in the middle of upgrading based on following this guide, and we did not find the Unit Testing docs page until several hours into a search on why our tests were breaking.
  • Loading branch information
Cam Sloan authored and DSchau committed Sep 20, 2018
1 parent b91b277 commit ef0e074
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/docs/migrating-from-v1-to-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ This is a reference for upgrading your site from Gatsby v1 to Gatsby v2. While t
- [Use Query in place of RootQueryType](#use-query-in-place-of-rootquerytype)
- [Typography.js Plugin Config](#typographyjs-plugin-config-changes)
- [Update CSS Modules class names that use dashes](#update-css-modules-class-names-that-use-dashes)
- [Update Jest configuration](#update-jest-configuration)

- [Resolving Deprecations](#resolving-deprecations)

Expand Down Expand Up @@ -680,6 +681,10 @@ export default ({ children }) => (
TODO: add a code snippet that uses [`onCreateWebpackConfig`](/docs/node-apis/#onCreateWebpackConfig) to revert to Gatsby's v1 behaviour.

### Update Jest configuration

If you were using Jest with Gatsby V1, you will need to make some updates to your configuration when upgrading to Gatsby V2. You can view the complete details of setting up your test environment on the [Unit Testing](/docs/unit-testing/) page of the docs.

### gatsby-image's `outerWrapperClassName` was removed
Because the outer wrapper `div` was removed, you can no longer use `outerWrapperClassName` for styling your images. You should merge those styles into your wrapper's class.
Expand Down

0 comments on commit ef0e074

Please sign in to comment.