-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We need to mock reac-markdown and react-leaflet since jest does not fully support ESM syntax yet. See remarkjs/react-markdown#635 (comment).
- Loading branch information
Showing
4 changed files
with
24 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
import React from 'react'; | ||
import { render } from '@testing-library/react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import { I18nProvider } from '@lingui/react'; | ||
import {HelmetProvider} from 'react-helmet-async'; | ||
import i18n from './i18n'; | ||
import App from './App'; | ||
|
||
test('renders heading', () => { | ||
const { getByText } = render( | ||
render( | ||
<I18nProvider i18n={i18n}> | ||
<App /> | ||
<HelmetProvider> | ||
<App /> | ||
</HelmetProvider> | ||
</I18nProvider> | ||
); | ||
const element = getByText(/^about$/i); | ||
const element = screen.getByText(/^about$/i); | ||
expect(element).toBeInTheDocument(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export function MapContainer({ children }){ | ||
return <>{children}</>; | ||
} | ||
|
||
export function TileLayer({ children }){ | ||
return <>{children}</>; | ||
} | ||
|
||
export function Marker({ children }){ | ||
return <>{children}</>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
function ReactMarkdown({ children }){ | ||
return <>{children}</>; | ||
} | ||
|
||
export default ReactMarkdown; |