2020-06-30 19:38:02 +02:00
|
|
|
import React from 'react'
|
|
|
|
import testRender from '../testRender'
|
2020-11-18 20:01:33 +01:00
|
|
|
import Page from '../../../src/components/templates/Page'
|
2020-06-30 19:38:02 +02:00
|
|
|
import {
|
|
|
|
createHistory,
|
|
|
|
createMemorySource,
|
|
|
|
LocationProvider
|
|
|
|
} from '@reach/router'
|
|
|
|
|
2020-11-18 20:01:33 +01:00
|
|
|
describe('Page', () => {
|
2020-06-30 19:38:02 +02:00
|
|
|
const history = createHistory(createMemorySource('/'))
|
|
|
|
|
|
|
|
testRender(
|
|
|
|
<LocationProvider history={history}>
|
2020-11-18 20:01:33 +01:00
|
|
|
<Page title="Hello" uri={history.location.href}>
|
2020-07-10 13:19:04 +02:00
|
|
|
Hello
|
2020-11-18 20:01:33 +01:00
|
|
|
</Page>
|
2020-06-30 19:38:02 +02:00
|
|
|
</LocationProvider>
|
|
|
|
)
|
|
|
|
})
|