mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-06-10 01:24:20 +02:00
remove default snapshot test
This commit is contained in:
parent
33820f43eb
commit
8e72708b4e
@ -1,42 +0,0 @@
|
|||||||
import renderer from "react-test-renderer"
|
|
||||||
import { Provider } from "react-redux"
|
|
||||||
import { MemoryRouter } from "react-router-dom"
|
|
||||||
|
|
||||||
import App from ".."
|
|
||||||
|
|
||||||
describe("<App />", () => {
|
|
||||||
it("renders", () => {
|
|
||||||
const mockStore = {
|
|
||||||
default: () => null,
|
|
||||||
subscribe: () => null,
|
|
||||||
dispatch: () => null,
|
|
||||||
getState: () => ({ home: () => null }),
|
|
||||||
}
|
|
||||||
const mockRoute = {
|
|
||||||
routes: [
|
|
||||||
{
|
|
||||||
path: "/",
|
|
||||||
exact: true,
|
|
||||||
component: () => (
|
|
||||||
<div>
|
|
||||||
<h1>Welcome Home!</h1>
|
|
||||||
</div>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
const tree = renderer
|
|
||||||
.create(
|
|
||||||
// @ts-expect-error
|
|
||||||
<Provider store={mockStore}>
|
|
||||||
<MemoryRouter>
|
|
||||||
<App route={mockRoute} />
|
|
||||||
</MemoryRouter>
|
|
||||||
</Provider>
|
|
||||||
)
|
|
||||||
.toJSON()
|
|
||||||
|
|
||||||
expect(tree).toMatchSnapshot()
|
|
||||||
})
|
|
||||||
})
|
|
@ -1,33 +0,0 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
||||||
|
|
||||||
exports[`<App /> renders 1`] = `
|
|
||||||
<div
|
|
||||||
className="app"
|
|
||||||
>
|
|
||||||
<a
|
|
||||||
className="header"
|
|
||||||
href="/"
|
|
||||||
onClick={[Function]}
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
alt="Logo"
|
|
||||||
role="presentation"
|
|
||||||
src="IMAGE_MOCK"
|
|
||||||
/>
|
|
||||||
<h1>
|
|
||||||
<em>
|
|
||||||
REACT COOL STARTER
|
|
||||||
</em>
|
|
||||||
</h1>
|
|
||||||
</a>
|
|
||||||
<hr />
|
|
||||||
<div>
|
|
||||||
<h1>
|
|
||||||
Welcome Home!
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className="Toastify"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
`;
|
|
Loading…
x
Reference in New Issue
Block a user