Initial commit

This commit is contained in:
forceoranj
2021-10-16 01:53:56 +02:00
commit ebdd8dccdd
104 changed files with 29770 additions and 0 deletions

42
src/app/__tests__/App.tsx Executable file
View File

@@ -0,0 +1,42 @@
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()
})
})

View File

@@ -0,0 +1,30 @@
// 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>
`;