mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
test fixes
This commit is contained in:
parent
fe37382833
commit
7d09350967
@ -3,12 +3,14 @@ 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'
|
||||
import oceanMock from '../../../__mocks__/ocean-mock'
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
describe('AssetDetails', () => {
|
||||
it('renders loading without crashing', () => {
|
||||
const { container } = render(
|
||||
<AssetDetails
|
||||
ocean={oceanMock}
|
||||
metadata={({ main: { name: '' } } as any) as MetaData}
|
||||
ddo={({} as any) as DDO}
|
||||
/>
|
||||
@ -20,6 +22,7 @@ describe('AssetDetails', () => {
|
||||
const { container } = render(
|
||||
<Router>
|
||||
<AssetDetails
|
||||
ocean={oceanMock}
|
||||
metadata={
|
||||
({
|
||||
main: {
|
||||
@ -46,7 +49,8 @@ describe('AssetDetails', () => {
|
||||
const files = [
|
||||
{
|
||||
index: 0,
|
||||
url: 'https://hello.com'
|
||||
url: 'https://hello.com',
|
||||
contentType: 'application/json'
|
||||
}
|
||||
]
|
||||
const { container } = render(datafilesLine(files))
|
||||
@ -57,11 +61,13 @@ describe('AssetDetails', () => {
|
||||
const files = [
|
||||
{
|
||||
index: 0,
|
||||
url: 'https://hello.com'
|
||||
url: 'https://hello.com',
|
||||
contentType: 'application/json'
|
||||
},
|
||||
{
|
||||
index: 1,
|
||||
url: 'https://hello2.com'
|
||||
url: 'https://hello2.com',
|
||||
contentType: 'application/json'
|
||||
}
|
||||
]
|
||||
const { container } = render(datafilesLine(files))
|
||||
|
Loading…
Reference in New Issue
Block a user