1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

add render tests

This commit is contained in:
Matthias Kretschmann 2019-05-27 20:24:03 +02:00
parent d74a4c0cbc
commit 2506939f62
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,15 @@
import React from 'react'
import { render } from 'react-testing-library'
import AssetsLatest from './AssetsLatest'
import { BrowserRouter } from 'react-router-dom'
describe('AssetsLatest', () => {
it('renders without crashing', () => {
const { container } = render(
<BrowserRouter>
<AssetsLatest />
</BrowserRouter>
)
expect(container.firstChild).toBeInTheDocument()
})
})

View File

@ -0,0 +1,15 @@
import React from 'react'
import { render } from 'react-testing-library'
import ChannelTeaser from './ChannelTeaser'
import { BrowserRouter } from 'react-router-dom'
describe('ChannelTeaser', () => {
it('renders without crashing', () => {
const { container } = render(
<BrowserRouter>
<ChannelTeaser channel="ai-for-good" />
</BrowserRouter>
)
expect(container.firstChild).toBeInTheDocument()
})
})