1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-06-30 05:31:44 +02:00

Merge pull request #139 from kremalicious/fix/tests

switch to @testing-library/react
This commit is contained in:
Matthias Kretschmann 2019-05-30 23:22:38 +02:00 committed by GitHub
commit 8e09d3c689
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 20 additions and 20 deletions

View File

@ -1,6 +1,6 @@
import 'jest-dom/extend-expect'
// this is basically: afterEach(cleanup)
import 'react-testing-library/cleanup-after-each'
import '@testing-library/react/cleanup-after-each'
import 'jest-canvas-mock'

View File

@ -61,6 +61,7 @@
"@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.7.1",
"babel-preset-gatsby": "^0.1.11",
@ -80,7 +81,6 @@
"prepend": "^1.0.2",
"prettier": "^1.17.0",
"prettier-stylelint": "^0.4.2",
"react-testing-library": "^7.0.1",
"slugify": "^1.3.4",
"stylelint": "^10.0.1",
"stylelint-config-css-modules": "^1.3.0",

View File

@ -1,5 +1,5 @@
import React from 'react'
import { render } from 'react-testing-library'
import { render } from '@testing-library/react'
import Button from './Button'

View File

@ -1,5 +1,5 @@
import React from 'react'
import { render } from 'react-testing-library'
import { render } from '@testing-library/react'
import HostnameCheck from './HostnameCheck'
describe('HostnameCheck', () => {

View File

@ -1,5 +1,5 @@
import React from 'react'
import { render } from 'react-testing-library'
import { render } from '@testing-library/react'
import LinkIcon from './LinkIcon'

View File

@ -1,5 +1,5 @@
import React from 'react'
import { render, fireEvent, waitForElement } from 'react-testing-library'
import { render, fireEvent, waitForElement } from '@testing-library/react'
import { StaticQuery } from 'gatsby'
import Vcard, { constructVcard, toDataURL, init } from './Vcard'
import data from '../../../jest/__fixtures__/meta.json'

View File

@ -1,5 +1,5 @@
import React from 'react'
import { render } from 'react-testing-library'
import { render } from '@testing-library/react'
import Availability from './Availability'
import { useStaticQuery } from 'gatsby'
import data from '../../../jest/__fixtures__/meta.json'

View File

@ -1,5 +1,5 @@
import React from 'react'
import { render } from 'react-testing-library'
import { render } from '@testing-library/react'
import { StaticQuery } from 'gatsby'
import LogoUnit from './LogoUnit'
import data from '../../../jest/__fixtures__/meta.json'

View File

@ -1,5 +1,5 @@
import React from 'react'
import { render } from 'react-testing-library'
import { render } from '@testing-library/react'
import { useStaticQuery } from 'gatsby'
import Networks from './Networks'
import data from '../../../jest/__fixtures__/meta.json'

View File

@ -1,5 +1,5 @@
import React from 'react'
import { render } from 'react-testing-library'
import { render } from '@testing-library/react'
import ProjectImage from './ProjectImage'
import data from '../../../jest/__fixtures__/projects.json'

View File

@ -1,5 +1,5 @@
import React from 'react'
import { render } from 'react-testing-library'
import { render } from '@testing-library/react'
import ProjectLinks from './ProjectLinks'
describe('ProjectLinks', () => {

View File

@ -1,5 +1,5 @@
import React from 'react'
import { render } from 'react-testing-library'
import { render } from '@testing-library/react'
import ProjectTechstack from './ProjectTechstack'
describe('ProjectTechstack', () => {

View File

@ -1,5 +1,5 @@
import React from 'react'
import { render } from 'react-testing-library'
import { render } from '@testing-library/react'
import Repository from './Repository'
import repos from '../../../jest/__fixtures__/repos.json'

View File

@ -1,5 +1,5 @@
import React from 'react'
import { render, fireEvent, cleanup } from 'react-testing-library'
import { render, fireEvent, cleanup } from '@testing-library/react'
import { Provider } from '../../store/createContext'
import ThemeSwitch from './ThemeSwitch'

View File

@ -1,5 +1,5 @@
import React from 'react'
import { render } from 'react-testing-library'
import { render } from '@testing-library/react'
import { StaticQuery, useStaticQuery } from 'gatsby'
import Footer from './Footer'
import data from '../../../jest/__fixtures__/meta.json'

View File

@ -1,5 +1,5 @@
import React from 'react'
import { render } from 'react-testing-library'
import { render } from '@testing-library/react'
import { StaticQuery, useStaticQuery } from 'gatsby'
import Header from './Header'
import { Provider } from '../../store/createContext'

View File

@ -1,5 +1,5 @@
import React from 'react'
import { render } from 'react-testing-library'
import { render } from '@testing-library/react'
import Repositories from './Repositories'
import repos from '../../../jest/__fixtures__/repos.json'

View File

@ -1,5 +1,5 @@
import React from 'react'
import { render } from 'react-testing-library'
import { render } from '@testing-library/react'
import { useStaticQuery } from 'gatsby'
import { useMeta } from './use-meta'
import data from '../../jest/__fixtures__/meta.json'

View File

@ -1,5 +1,5 @@
import React from 'react'
import { render } from 'react-testing-library'
import { render } from '@testing-library/react'
import { StaticQuery } from 'gatsby'
import Home from '../index'
import meta from '../../../jest/__fixtures__/meta.json'

View File

@ -1,5 +1,5 @@
import React from 'react'
import { render } from 'react-testing-library'
import { render } from '@testing-library/react'
import AppProvider from './AppProvider.jsx'
describe('AppProvider', () => {