1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00
market/tests/unit/pages/index.test.tsx

22 lines
549 B
TypeScript
Raw Normal View History

2020-05-07 08:03:30 +02:00
import React from 'react'
import { render } from '@testing-library/react'
2020-06-30 16:22:22 +02:00
import Home from '../../../src/components/pages/Home'
import {
createHistory,
createMemorySource,
LocationProvider
} from '@reach/router'
2020-05-07 08:03:30 +02:00
describe('Home', () => {
it('renders without crashing', () => {
const history = createHistory(createMemorySource('/search?text=water'))
const { container } = render(
<LocationProvider history={history}>
<Home />
</LocationProvider>
)
2020-05-07 08:03:30 +02:00
expect(container.firstChild).toBeInTheDocument()
})
})