mirror of
https://github.com/kremalicious/portfolio.git
synced 2025-01-03 18:35:00 +01:00
switch to @testing-library/react
This commit is contained in:
parent
43ec0c9291
commit
6cb34b05f2
@ -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'
|
||||
|
@ -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",
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
|
||||
import Button from './Button'
|
||||
|
||||
|
@ -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', () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
|
||||
import LinkIcon from './LinkIcon'
|
||||
|
||||
|
@ -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'
|
||||
|
@ -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'
|
||||
|
@ -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'
|
||||
|
@ -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'
|
||||
|
@ -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'
|
||||
|
||||
|
@ -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', () => {
|
||||
|
@ -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', () => {
|
||||
|
@ -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'
|
||||
|
||||
|
@ -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'
|
||||
|
||||
|
@ -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'
|
||||
|
@ -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'
|
||||
|
@ -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'
|
||||
|
||||
|
@ -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'
|
||||
|
@ -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'
|
||||
|
@ -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', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user