diff --git a/gatsby-config.js b/gatsby-config.js index 5ea9741..96c321d 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -2,5 +2,5 @@ module.exports = { siteMetadata: { title: 'Gatsby Default Starter', }, - plugins: ['gatsby-plugin-react-helmet'], + plugins: ['gatsby-plugin-react-next', 'gatsby-plugin-react-helmet'], } diff --git a/package.json b/package.json index d3411ba..9fdca5d 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,14 @@ "testRegex": "/.*(__tests__\\/.*)|(.*(test|spec))\\.jsx?$", "moduleNameMapper": { ".+\\.(css|styl|less|sass|scss)$": "identity-obj-proxy", - ".+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/__mocks__/fileMock.js" + ".+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/__mocks__/fileMock.js", + "^react$": "gatsby-plugin-react-next/node_modules/react", + "^react-dom$": "gatsby-plugin-react-next/node_modules/react-dom" }, - "testPathIgnorePatterns": ["node_modules", ".cache"], + "testPathIgnorePatterns": [ + "node_modules", + ".cache" + ], "transformIgnorePatterns": [ "node_modules/(?!(gatsby)/)" ], @@ -48,6 +53,7 @@ "@babel/preset-react": "^7.0.0", "babel-core": "^7.0.0-0", "babel-jest": "^23.6.0", + "gatsby-plugin-react-next": "^1.0.11", "identity-obj-proxy": "^3.0.0", "jest": "^23.6.0", "prettier": "^1.13.7", diff --git a/src/components/__snapshots__/header.test.js.snap b/src/components/__snapshots__/header.test.js.snap new file mode 100644 index 0000000..bc7242e --- /dev/null +++ b/src/components/__snapshots__/header.test.js.snap @@ -0,0 +1,32 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Header renders correctly 1`] = ` +
+
+

+ Hello, my name is ben +

+
+
+`; diff --git a/yarn.lock b/yarn.lock index 9063402..cbdfcdd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2622,7 +2622,7 @@ core-js@^1.0.0, core-js@^1.2.6: version "1.2.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" -core-js@^2.4.0, core-js@^2.5.0: +core-js@^2.4.0, core-js@^2.5.0, core-js@^2.5.1: version "2.5.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" @@ -3963,6 +3963,15 @@ gatsby-plugin-react-helmet@^2.0.11: dependencies: babel-runtime "^6.26.0" +gatsby-plugin-react-next@^1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/gatsby-plugin-react-next/-/gatsby-plugin-react-next-1.0.11.tgz#715cab5ea86f64664f96af3e7f3640eecd9de5e3" + dependencies: + babel-runtime "^6.26.0" + core-js "^2.5.1" + react "^16.0.0" + react-dom "^16.0.0" + gatsby-react-router-scroll@^1.0.18: version "1.0.18" resolved "https://registry.yarnpkg.com/gatsby-react-router-scroll/-/gatsby-react-router-scroll-1.0.18.tgz#616ffb801dbdbe4598611e2ff3861b91ac3eecbf" @@ -7619,6 +7628,15 @@ react-dom@^15.6.0: object-assign "^4.1.0" prop-types "^15.5.10" +react-dom@^16.0.0: + version "16.5.1" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.5.1.tgz#29d0c5a01ed3b6b4c14309aa91af6ec4eb4f292c" + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + schedule "^0.4.0" + react-error-overlay@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-3.0.0.tgz#c2bc8f4d91f1375b3dad6d75265d51cd5eeaf655" @@ -7701,6 +7719,15 @@ react@^15.6.0: object-assign "^4.1.0" prop-types "^15.5.10" +react@^16.0.0: + version "16.5.1" + resolved "https://registry.yarnpkg.com/react/-/react-16.5.1.tgz#8cb8e9f8cdcb4bde41c9a138bfbf907e66132372" + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + schedule "^0.4.0" + read-cache@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774"