mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
switch to @testing-library/react package
This commit is contained in:
parent
2d512f341e
commit
b90974938c
44
client/package-lock.json
generated
44
client/package-lock.json
generated
@ -1548,6 +1548,28 @@
|
||||
"loader-utils": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"@testing-library/dom": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-5.0.1.tgz",
|
||||
"integrity": "sha512-HmyN4b/PmSaSB1ku0tWjgnTtyrwNBXEpp44wgfNaDhyj6IJTCWp1GAf4AANoLGItgMsYjepwWOdMyuJ/8iyStQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.4.5",
|
||||
"@sheerun/mutationobserver-shim": "^0.3.2",
|
||||
"pretty-format": "^24.8.0",
|
||||
"wait-for-expect": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"@testing-library/react": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@testing-library/react/-/react-8.0.1.tgz",
|
||||
"integrity": "sha512-N/1pJfhEnNYkGyxuw4xbp03evaS0z/CT8o0QgTfJqGlukAcU15xf9uU1w03NHKZJcU69nOCBAoAkXHtHzYwMbg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.4.5",
|
||||
"@testing-library/dom": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@types/babel__core": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.2.tgz",
|
||||
@ -5350,18 +5372,6 @@
|
||||
"entities": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"dom-testing-library": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/dom-testing-library/-/dom-testing-library-4.1.0.tgz",
|
||||
"integrity": "sha512-654GHd0oPC31S+ll1bJH9NUOBRzcHcrf23/XzJh41o6g67uGUpF9tn23qmbcwjNauoRqKQfAdHCDwr/Ez/Ot7A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.4.3",
|
||||
"@sheerun/mutationobserver-shim": "^0.3.2",
|
||||
"pretty-format": "^24.7.0",
|
||||
"wait-for-expect": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"dom-walk": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz",
|
||||
@ -13497,16 +13507,6 @@
|
||||
"shallowequal": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"react-testing-library": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/react-testing-library/-/react-testing-library-7.0.1.tgz",
|
||||
"integrity": "sha512-doQkM3/xPcIm22x9jgTkGxU8xqXg4iWvM1WwbbQ7CI5/EMk3DhloYBwMyk+Ywtta3dIAIh9sC7llXoKovf3L+w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.4.3",
|
||||
"dom-testing-library": "^4.1.0"
|
||||
}
|
||||
},
|
||||
"react-transition-group": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.0.1.tgz",
|
||||
|
@ -40,6 +40,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@react-mock/state": "^0.1.8",
|
||||
"@testing-library/react": "^8.0.1",
|
||||
"@types/classnames": "^2.2.7",
|
||||
"@types/filesize": "^4.1.0",
|
||||
"@types/is-url": "^1.2.28",
|
||||
@ -57,7 +58,6 @@
|
||||
"jest-mock-axios": "^3.0.0",
|
||||
"node-sass": "^4.12.0",
|
||||
"react-scripts": "^3.0.0",
|
||||
"react-testing-library": "^7.0.0",
|
||||
"typescript": "^3.4.5"
|
||||
},
|
||||
"repository": {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import App from './App'
|
||||
import { User } from './context'
|
||||
import { userMock, userMockConnected } from '../__mocks__/user-mock'
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import { BrowserRouter as Router } from 'react-router-dom'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import Routes from './Routes'
|
||||
import { User } from './context'
|
||||
import { userMockConnected } from '../__mocks__/user-mock'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import { toDataUrl } from 'ethereum-blockies'
|
||||
import Account from './Account'
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import { BrowserRouter as Router } from 'react-router-dom'
|
||||
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 CategoryImage from './CategoryImage'
|
||||
import formPublish from '../../data/form-publish.json'
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import Form from './Form'
|
||||
|
||||
describe('Form', () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import Input from './Input'
|
||||
|
||||
describe('Input', () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import InputGroup from './InputGroup'
|
||||
|
||||
describe('InputGroup', () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import Label from './Label'
|
||||
|
||||
describe('Label', () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import Row from './Row'
|
||||
|
||||
describe('Row', () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import Markdown from './Markdown'
|
||||
|
||||
describe('Markdown', () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render, waitForElement } from 'react-testing-library'
|
||||
import { render, waitForElement } from '@testing-library/react'
|
||||
import mockAxios from 'jest-mock-axios'
|
||||
import VersionNumbers from './VersionNumbers'
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import Popover from './Popover'
|
||||
import { userMock, userMockConnected } from '../../../../__mocks__/user-mock'
|
||||
import { User } from '../../../context'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render, fireEvent } from 'react-testing-library'
|
||||
import { render, fireEvent } from '@testing-library/react'
|
||||
import AccountStatus from '.'
|
||||
|
||||
describe('AccountStatus', () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import Pagination from './Pagination'
|
||||
|
||||
describe('Pagination', () => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import { BrowserRouter } from 'react-router-dom'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import AssetsLatest from './AssetsLatest'
|
||||
import { User } from '../../context'
|
||||
import { userMockConnected } from '../../../__mocks__/user-mock'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import ChannelTeaser from './ChannelTeaser'
|
||||
import { BrowserRouter } from 'react-router-dom'
|
||||
import { User } from '../../context'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render, fireEvent } from 'react-testing-library'
|
||||
import { render, fireEvent } from '@testing-library/react'
|
||||
import Web3message from './Web3message'
|
||||
import { User } from '../../context'
|
||||
import { userMock, userMockConnected } from '../../../__mocks__/user-mock'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import { DDO, MetaData } from '@oceanprotocol/squid'
|
||||
import { BrowserRouter as Router } from 'react-router-dom'
|
||||
import AssetDetails, { datafilesLine } from './AssetDetails'
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
|
||||
import React from 'react'
|
||||
import { render, fireEvent } from 'react-testing-library'
|
||||
import { render, fireEvent } from '@testing-library/react'
|
||||
import { DDO } from '@oceanprotocol/squid'
|
||||
import { StateMock } from '@react-mock/state'
|
||||
import ReactGA from 'react-ga'
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import { DDO } from '@oceanprotocol/squid'
|
||||
import AssetFilesDetails from './AssetFilesDetails'
|
||||
import { User } from '../../../context'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import Details from './index'
|
||||
|
||||
describe('Details', () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import Channel from './Channel'
|
||||
import { User } from '../../context'
|
||||
import { createMemoryHistory } from 'history'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import Route from './Route'
|
||||
|
||||
describe('Route', () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import About from './About'
|
||||
|
||||
describe('About', () => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import { BrowserRouter as Router } from 'react-router-dom'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import Channels from './Channels'
|
||||
import { User } from '../context'
|
||||
import { userMockConnected } from '../../__mocks__/user-mock'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render, fireEvent } from 'react-testing-library'
|
||||
import { render, fireEvent } from '@testing-library/react'
|
||||
import Faucet from './Faucet'
|
||||
import { User } from '../context'
|
||||
import { userMockConnected } from '../../__mocks__/user-mock'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import { User } from '../context'
|
||||
import History from './History'
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import { Router } from 'react-router'
|
||||
import { createBrowserHistory } from 'history'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import Home from './Home'
|
||||
import { userMock } from '../../__mocks__/user-mock'
|
||||
import { User } from '../context'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import NotFound from './NotFound'
|
||||
|
||||
describe('NotFound', () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import Item from './Item'
|
||||
|
||||
describe('Item', () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render, fireEvent } from 'react-testing-library'
|
||||
import { render, fireEvent } from '@testing-library/react'
|
||||
import ItemForm from './ItemForm'
|
||||
|
||||
const addItem = jest.fn()
|
||||
|
@ -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 Files from '.'
|
||||
|
||||
const onChange = jest.fn()
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import Progress from './Progress'
|
||||
|
||||
describe('Progress', () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import Step from './Step'
|
||||
|
||||
const stateMock = {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render, fireEvent } from 'react-testing-library'
|
||||
import { render, fireEvent } from '@testing-library/react'
|
||||
import { BrowserRouter as Router } from 'react-router-dom'
|
||||
import StepRegisterContent from './StepRegisterContent'
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import Publish from '.'
|
||||
|
||||
describe('Progress', () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import Search from './Search'
|
||||
import { User } from '../context'
|
||||
import { createMemoryHistory } from 'history'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from 'react-testing-library'
|
||||
import { render } from '@testing-library/react'
|
||||
import Styleguide from './Styleguide'
|
||||
|
||||
describe('Styleguide', () => {
|
||||
|
@ -1,2 +1,2 @@
|
||||
import 'jest-dom/extend-expect'
|
||||
import 'react-testing-library/cleanup-after-each'
|
||||
import '@testing-library/react/cleanup-after-each'
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "commons",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
22
server/package-lock.json
generated
22
server/package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "commons-server",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@ -1557,9 +1557,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"diff": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
|
||||
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz",
|
||||
"integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==",
|
||||
"dev": true
|
||||
},
|
||||
"diff-sequences": {
|
||||
@ -1787,9 +1787,9 @@
|
||||
}
|
||||
},
|
||||
"express": {
|
||||
"version": "4.17.0",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-4.17.0.tgz",
|
||||
"integrity": "sha512-1Z7/t3Z5ZnBG252gKUPyItc4xdeaA0X934ca2ewckAsVsw9EG71i++ZHZPYnus8g/s5Bty8IMpSVEuRkmwwPRQ==",
|
||||
"version": "4.17.1",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz",
|
||||
"integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==",
|
||||
"requires": {
|
||||
"accepts": "~1.3.7",
|
||||
"array-flatten": "1.1.1",
|
||||
@ -5746,13 +5746,13 @@
|
||||
}
|
||||
},
|
||||
"ts-node": {
|
||||
"version": "8.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.1.0.tgz",
|
||||
"integrity": "sha512-34jpuOrxDuf+O6iW1JpgTRDFynUZ1iEqtYruBqh35gICNjN8x+LpVcPAcwzLPi9VU6mdA3ym+x233nZmZp445A==",
|
||||
"version": "8.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.2.0.tgz",
|
||||
"integrity": "sha512-m8XQwUurkbYqXrKqr3WHCW310utRNvV5OnRVeISeea7LoCWVcdfeB/Ntl8JYWFh+WRoUAdBgESrzKochQt7sMw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arg": "^4.1.0",
|
||||
"diff": "^3.1.0",
|
||||
"diff": "^4.0.1",
|
||||
"make-error": "^1.1.1",
|
||||
"source-map-support": "^0.5.6",
|
||||
"yn": "^3.0.0"
|
||||
|
@ -16,7 +16,7 @@
|
||||
"body-parser": "^1.18.3",
|
||||
"compression": "^1.7.4",
|
||||
"debug": "^4.1.1",
|
||||
"express": "^4.16.4",
|
||||
"express": "^4.17.1",
|
||||
"express-validator": "^5.3.1",
|
||||
"morgan": "^1.9.1",
|
||||
"request": "^2.88.0"
|
||||
@ -32,11 +32,11 @@
|
||||
"@types/node": "^11.13.4",
|
||||
"@types/request": "^2.48.1",
|
||||
"jasmine": "^3.4.0",
|
||||
"jest": "^24.7.1",
|
||||
"jest": "^24.8.0",
|
||||
"nodemon": "^1.18.11",
|
||||
"supertest": "^4.0.2",
|
||||
"ts-jest": "^24.0.2",
|
||||
"ts-node": "^8.1.0",
|
||||
"ts-node": "^8.2.0",
|
||||
"typescript": "^3.4.5"
|
||||
},
|
||||
"repository": {
|
||||
|
Loading…
Reference in New Issue
Block a user