mirror of
https://github.com/kremalicious/blog.git
synced 2024-11-15 09:35:21 +01:00
Merge pull request #155 from kremalicious/fix/tests
switch to @testing-library/react
This commit is contained in:
commit
e3534e67db
@ -1,4 +1,4 @@
|
|||||||
import 'jest-dom/extend-expect'
|
import 'jest-dom/extend-expect'
|
||||||
|
|
||||||
// this is basically: afterEach(cleanup)
|
// this is basically: afterEach(cleanup)
|
||||||
import 'react-testing-library/cleanup-after-each'
|
import '@testing-library/react/cleanup-after-each'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { render } from 'react-testing-library'
|
import { render } from '@testing-library/react'
|
||||||
|
|
||||||
const testRender = component => {
|
const testRender = component => {
|
||||||
it('renders without crashing', () => {
|
it('renders without crashing', () => {
|
||||||
|
34
package.json
34
package.json
@ -32,32 +32,32 @@
|
|||||||
"dms2dec": "^1.1.0",
|
"dms2dec": "^1.1.0",
|
||||||
"fast-exif": "^1.0.1",
|
"fast-exif": "^1.0.1",
|
||||||
"fraction.js": "^4.0.12",
|
"fraction.js": "^4.0.12",
|
||||||
"gatsby": "^2.4.3",
|
"gatsby": "^2.7.5",
|
||||||
"gatsby-image": "^2.0.41",
|
"gatsby-image": "^2.1.2",
|
||||||
"gatsby-plugin-catch-links": "^2.0.13",
|
"gatsby-plugin-catch-links": "^2.0.15",
|
||||||
"gatsby-plugin-favicon": "^3.1.6",
|
"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-lunr": "^1.5.0",
|
||||||
"gatsby-plugin-matomo": "^0.7.0",
|
"gatsby-plugin-matomo": "^0.7.0",
|
||||||
"gatsby-plugin-meta-redirect": "^1.1.1",
|
"gatsby-plugin-meta-redirect": "^1.1.1",
|
||||||
"gatsby-plugin-offline": "^2.1.0",
|
"gatsby-plugin-offline": "^2.1.0",
|
||||||
"gatsby-plugin-react-helmet": "^3.0.12",
|
"gatsby-plugin-react-helmet": "^3.0.12",
|
||||||
"gatsby-plugin-sass": "^2.0.11",
|
"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-sitemap": "^2.1.0",
|
||||||
"gatsby-plugin-svgr": "^2.0.2",
|
"gatsby-plugin-svgr": "^2.0.2",
|
||||||
"gatsby-plugin-webpack-size": "^0.0.3",
|
"gatsby-plugin-webpack-size": "^0.0.3",
|
||||||
"gatsby-redirect-from": "^0.1.1",
|
"gatsby-redirect-from": "^0.1.1",
|
||||||
"gatsby-remark-autolink-headers": "^2.0.16",
|
"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-highlights": "^1.3.4",
|
||||||
"gatsby-remark-images": "^3.0.11",
|
"gatsby-remark-images": "^3.0.14",
|
||||||
"gatsby-remark-smartypants": "^2.0.9",
|
"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-source-graphql": "^2.0.18",
|
||||||
"gatsby-transformer-remark": "^2.3.12",
|
"gatsby-transformer-remark": "^2.3.12",
|
||||||
"gatsby-transformer-sharp": "^2.1.19",
|
"gatsby-transformer-sharp": "^2.1.20",
|
||||||
"graphql": "^14.3.0",
|
"graphql": "^14.3.1",
|
||||||
"intersection-observer": "^0.7.0",
|
"intersection-observer": "^0.7.0",
|
||||||
"js-scrypt": "^0.2.0",
|
"js-scrypt": "^0.2.0",
|
||||||
"load-script": "^1.0.0",
|
"load-script": "^1.0.0",
|
||||||
@ -74,7 +74,7 @@
|
|||||||
"react-pose": "^4.0.8",
|
"react-pose": "^4.0.8",
|
||||||
"react-qr-svg": "^2.2.1",
|
"react-qr-svg": "^2.2.1",
|
||||||
"react-time": "^4.3.0",
|
"react-time": "^4.3.0",
|
||||||
"react-transition-group": "^4.0.1",
|
"react-transition-group": "^4.1.0",
|
||||||
"remark": "^10.0.1",
|
"remark": "^10.0.1",
|
||||||
"remark-react": "^5.0.1",
|
"remark-react": "^5.0.1",
|
||||||
"slugify": "^1.3.4",
|
"slugify": "^1.3.4",
|
||||||
@ -82,9 +82,10 @@
|
|||||||
"web3": "^1.0.0-beta.55"
|
"web3": "^1.0.0-beta.55"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/node": "^7.2.2",
|
"@babel/node": "^7.4.5",
|
||||||
"@babel/preset-env": "^7.4.4",
|
"@babel/preset-env": "^7.4.5",
|
||||||
"@svgr/webpack": "^4.2.0",
|
"@svgr/webpack": "^4.3.0",
|
||||||
|
"@testing-library/react": "^8.0.1",
|
||||||
"babel-eslint": "^10.0.1",
|
"babel-eslint": "^10.0.1",
|
||||||
"babel-jest": "^24.8.0",
|
"babel-jest": "^24.8.0",
|
||||||
"eslint": "^5.16.0",
|
"eslint": "^5.16.0",
|
||||||
@ -97,18 +98,17 @@
|
|||||||
"fs-extra": "^8.0.0",
|
"fs-extra": "^8.0.0",
|
||||||
"identity-obj-proxy": "^3.0.0",
|
"identity-obj-proxy": "^3.0.0",
|
||||||
"jest": "^24.8.0",
|
"jest": "^24.8.0",
|
||||||
"jest-dom": "^3.2.2",
|
"jest-dom": "^3.4.0",
|
||||||
"markdownlint-cli": "^0.16.0",
|
"markdownlint-cli": "^0.16.0",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"ora": "^3.4.0",
|
"ora": "^3.4.0",
|
||||||
"pify": "^4.0.1",
|
"pify": "^4.0.1",
|
||||||
"prettier": "^1.17.0",
|
"prettier": "^1.17.0",
|
||||||
"prettier-stylelint": "^0.4.2",
|
"prettier-stylelint": "^0.4.2",
|
||||||
"react-testing-library": "^7.0.0",
|
|
||||||
"stylelint": "^10.0.1",
|
"stylelint": "^10.0.1",
|
||||||
"stylelint-config-css-modules": "^1.4.0",
|
"stylelint-config-css-modules": "^1.4.0",
|
||||||
"stylelint-config-standard": "^18.3.0",
|
"stylelint-config-standard": "^18.3.0",
|
||||||
"stylelint-scss": "^3.6.1",
|
"stylelint-scss": "^3.7.0",
|
||||||
"why-did-you-update": "^1.0.6"
|
"why-did-you-update": "^1.0.6"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
// import { render } from 'react-testing-library'
|
// import { render } from '@testing-library/react'
|
||||||
import testRender from '../../../jest/testRender'
|
import testRender from '../../../jest/testRender'
|
||||||
|
|
||||||
import Container from './Container'
|
import Container from './Container'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
// import { render } from 'react-testing-library'
|
// import { render } from '@testing-library/react'
|
||||||
import testRender from '../../../jest/testRender'
|
import testRender from '../../../jest/testRender'
|
||||||
|
|
||||||
import Exif from './Exif'
|
import Exif from './Exif'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
// import { render } from 'react-testing-library'
|
// import { render } from '@testing-library/react'
|
||||||
import testRender from '../../../jest/testRender'
|
import testRender from '../../../jest/testRender'
|
||||||
|
|
||||||
import Hamburger from './Hamburger'
|
import Hamburger from './Hamburger'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
// import { render } from 'react-testing-library'
|
// import { render } from '@testing-library/react'
|
||||||
import testRender from '../../../jest/testRender'
|
import testRender from '../../../jest/testRender'
|
||||||
|
|
||||||
import Input from './Input'
|
import Input from './Input'
|
||||||
|
Loading…
Reference in New Issue
Block a user