2019-11-25 14:36:32 +01:00
|
|
|
import React from 'react'
|
2021-05-23 12:30:39 +02:00
|
|
|
import { render, screen } from '@testing-library/react'
|
2019-11-25 14:36:32 +01:00
|
|
|
import { createHistory, createMemorySource } from '@reach/router'
|
|
|
|
import Layout from './Layout'
|
|
|
|
|
|
|
|
describe('Layout', () => {
|
|
|
|
const history = createHistory(createMemorySource('/oceanprotocol'))
|
|
|
|
|
|
|
|
it('renders correctly', () => {
|
2021-05-23 12:30:39 +02:00
|
|
|
render(<Layout location={history.location}>Hello Layout</Layout>)
|
|
|
|
const element = screen.getByText('Hello Layout')
|
|
|
|
expect(element).toBeInTheDocument()
|
2019-11-25 14:36:32 +01:00
|
|
|
})
|
|
|
|
})
|