From a6cfc9cd8d59d9bad99db962ef336320d18e0037 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 30 May 2019 22:59:07 +0200 Subject: [PATCH 1/2] switch to @testing-library/react --- jest/testRender.js | 2 +- package.json | 2 +- src/components/atoms/Container.test.jsx | 2 +- src/components/atoms/Exif.test.jsx | 2 +- src/components/atoms/Hamburger.test.jsx | 2 +- src/components/atoms/Input.test.jsx | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/jest/testRender.js b/jest/testRender.js index 641cc90f..fe5a21fe 100644 --- a/jest/testRender.js +++ b/jest/testRender.js @@ -1,4 +1,4 @@ -import { render } from 'react-testing-library' +import { render } from '@testing-library/react' const testRender = component => { it('renders without crashing', () => { diff --git a/package.json b/package.json index 5e6176b1..4eaff0ba 100644 --- a/package.json +++ b/package.json @@ -85,6 +85,7 @@ "@babel/node": "^7.2.2", "@babel/preset-env": "^7.4.4", "@svgr/webpack": "^4.2.0", + "@testing-library/react": "^8.0.1", "babel-eslint": "^10.0.1", "babel-jest": "^24.8.0", "eslint": "^5.16.0", @@ -104,7 +105,6 @@ "pify": "^4.0.1", "prettier": "^1.17.0", "prettier-stylelint": "^0.4.2", - "react-testing-library": "^7.0.0", "stylelint": "^10.0.1", "stylelint-config-css-modules": "^1.4.0", "stylelint-config-standard": "^18.3.0", diff --git a/src/components/atoms/Container.test.jsx b/src/components/atoms/Container.test.jsx index 370ce8af..7d577082 100644 --- a/src/components/atoms/Container.test.jsx +++ b/src/components/atoms/Container.test.jsx @@ -1,5 +1,5 @@ import React from 'react' -// import { render } from 'react-testing-library' +// import { render } from '@testing-library/react' import testRender from '../../../jest/testRender' import Container from './Container' diff --git a/src/components/atoms/Exif.test.jsx b/src/components/atoms/Exif.test.jsx index b4c497af..576cf2b3 100644 --- a/src/components/atoms/Exif.test.jsx +++ b/src/components/atoms/Exif.test.jsx @@ -1,5 +1,5 @@ import React from 'react' -// import { render } from 'react-testing-library' +// import { render } from '@testing-library/react' import testRender from '../../../jest/testRender' import Exif from './Exif' diff --git a/src/components/atoms/Hamburger.test.jsx b/src/components/atoms/Hamburger.test.jsx index 9b6c61c9..a7de942d 100644 --- a/src/components/atoms/Hamburger.test.jsx +++ b/src/components/atoms/Hamburger.test.jsx @@ -1,5 +1,5 @@ import React from 'react' -// import { render } from 'react-testing-library' +// import { render } from '@testing-library/react' import testRender from '../../../jest/testRender' import Hamburger from './Hamburger' diff --git a/src/components/atoms/Input.test.jsx b/src/components/atoms/Input.test.jsx index 52126d8e..bc5cdac3 100644 --- a/src/components/atoms/Input.test.jsx +++ b/src/components/atoms/Input.test.jsx @@ -1,5 +1,5 @@ import React from 'react' -// import { render } from 'react-testing-library' +// import { render } from '@testing-library/react' import testRender from '../../../jest/testRender' import Input from './Input' From 33622716dff81dae0894fd5f0dff4a6d79b3724a Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 30 May 2019 23:01:43 +0200 Subject: [PATCH 2/2] package updates --- jest/setup-test-env.js | 2 +- package.json | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/jest/setup-test-env.js b/jest/setup-test-env.js index 99c14cda..8df56619 100644 --- a/jest/setup-test-env.js +++ b/jest/setup-test-env.js @@ -1,4 +1,4 @@ import 'jest-dom/extend-expect' // this is basically: afterEach(cleanup) -import 'react-testing-library/cleanup-after-each' +import '@testing-library/react/cleanup-after-each' diff --git a/package.json b/package.json index 4eaff0ba..df1bc1a1 100644 --- a/package.json +++ b/package.json @@ -32,32 +32,32 @@ "dms2dec": "^1.1.0", "fast-exif": "^1.0.1", "fraction.js": "^4.0.12", - "gatsby": "^2.4.3", - "gatsby-image": "^2.0.41", - "gatsby-plugin-catch-links": "^2.0.13", + "gatsby": "^2.7.5", + "gatsby-image": "^2.1.2", + "gatsby-plugin-catch-links": "^2.0.15", "gatsby-plugin-favicon": "^3.1.6", - "gatsby-plugin-feed": "^2.2.0", + "gatsby-plugin-feed": "^2.2.1", "gatsby-plugin-lunr": "^1.5.0", "gatsby-plugin-matomo": "^0.7.0", "gatsby-plugin-meta-redirect": "^1.1.1", "gatsby-plugin-offline": "^2.1.0", "gatsby-plugin-react-helmet": "^3.0.12", "gatsby-plugin-sass": "^2.0.11", - "gatsby-plugin-sharp": "^2.0.37", + "gatsby-plugin-sharp": "^2.1.2", "gatsby-plugin-sitemap": "^2.1.0", "gatsby-plugin-svgr": "^2.0.2", "gatsby-plugin-webpack-size": "^0.0.3", "gatsby-redirect-from": "^0.1.1", "gatsby-remark-autolink-headers": "^2.0.16", - "gatsby-remark-copy-linked-files": "^2.0.12", + "gatsby-remark-copy-linked-files": "^2.0.13", "gatsby-remark-highlights": "^1.3.4", - "gatsby-remark-images": "^3.0.11", + "gatsby-remark-images": "^3.0.14", "gatsby-remark-smartypants": "^2.0.9", - "gatsby-source-filesystem": "^2.0.33", + "gatsby-source-filesystem": "^2.0.37", "gatsby-source-graphql": "^2.0.18", "gatsby-transformer-remark": "^2.3.12", - "gatsby-transformer-sharp": "^2.1.19", - "graphql": "^14.3.0", + "gatsby-transformer-sharp": "^2.1.20", + "graphql": "^14.3.1", "intersection-observer": "^0.7.0", "js-scrypt": "^0.2.0", "load-script": "^1.0.0", @@ -74,7 +74,7 @@ "react-pose": "^4.0.8", "react-qr-svg": "^2.2.1", "react-time": "^4.3.0", - "react-transition-group": "^4.0.1", + "react-transition-group": "^4.1.0", "remark": "^10.0.1", "remark-react": "^5.0.1", "slugify": "^1.3.4", @@ -82,9 +82,9 @@ "web3": "^1.0.0-beta.55" }, "devDependencies": { - "@babel/node": "^7.2.2", - "@babel/preset-env": "^7.4.4", - "@svgr/webpack": "^4.2.0", + "@babel/node": "^7.4.5", + "@babel/preset-env": "^7.4.5", + "@svgr/webpack": "^4.3.0", "@testing-library/react": "^8.0.1", "babel-eslint": "^10.0.1", "babel-jest": "^24.8.0", @@ -98,7 +98,7 @@ "fs-extra": "^8.0.0", "identity-obj-proxy": "^3.0.0", "jest": "^24.8.0", - "jest-dom": "^3.2.2", + "jest-dom": "^3.4.0", "markdownlint-cli": "^0.16.0", "npm-run-all": "^4.1.5", "ora": "^3.4.0", @@ -108,7 +108,7 @@ "stylelint": "^10.0.1", "stylelint-config-css-modules": "^1.4.0", "stylelint-config-standard": "^18.3.0", - "stylelint-scss": "^3.6.1", + "stylelint-scss": "^3.7.0", "why-did-you-update": "^1.0.6" }, "engines": {