2019-04-30 19:19:28 +02:00
|
|
|
import React from 'react'
|
|
|
|
import { BrowserRouter as Router } from 'react-router-dom'
|
2019-05-31 13:38:38 +02:00
|
|
|
import { render } from '@testing-library/react'
|
2019-04-30 19:19:28 +02:00
|
|
|
import Routes from './Routes'
|
2019-05-31 12:56:13 +02:00
|
|
|
import { User } from './context'
|
|
|
|
import { userMockConnected } from '../__mocks__/user-mock'
|
2019-04-30 19:19:28 +02:00
|
|
|
|
|
|
|
describe('Routes', () => {
|
|
|
|
it('renders without crashing', () => {
|
|
|
|
const { container } = render(
|
2019-05-31 12:56:13 +02:00
|
|
|
<User.Provider value={userMockConnected}>
|
|
|
|
<Router>
|
|
|
|
<Routes />
|
|
|
|
</Router>
|
|
|
|
</User.Provider>
|
2019-04-30 19:19:28 +02:00
|
|
|
)
|
|
|
|
expect(container.firstChild).toBeInTheDocument()
|
|
|
|
})
|
|
|
|
})
|