mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
* asset teaser test, story, useUserPreferences Jest mock * fixtures & mocks * more tests * cleanup * more tests * more tests * more tests * more tests * typing fix * package updates * reorg * more tests * more tests * more tests * more tests * reorg, more tests * reorg fixes * more tests * rebase fix * subgraph query typing fix * restore some storybook stories * more tests * more tests * package lock fix * graphql override
25 lines
658 B
TypeScript
25 lines
658 B
TypeScript
import React from 'react'
|
|
import testRender from '../../../../.jest/testRender'
|
|
import AssetListTitle from '.'
|
|
import { render } from '@testing-library/react'
|
|
|
|
jest.mock('../../../@utils/aquarius', () => ({
|
|
getAssetsNames: () => Promise.resolve('Test')
|
|
}))
|
|
|
|
describe('AssetListTitle', () => {
|
|
testRender(
|
|
<AssetListTitle asset={{ metadata: { name: 'Hello world' } } as any} />
|
|
)
|
|
|
|
it('renders with passed title', () => {
|
|
render(<AssetListTitle title="Hello Title" />)
|
|
})
|
|
|
|
it('renders with passed DID', () => {
|
|
render(
|
|
<AssetListTitle did="did:op:764b81877039fa2651b919fc91c399799acb837f270e6d17bfb7973fbe6e9408" />
|
|
)
|
|
})
|
|
})
|