Skip to content

Commit

Permalink
fix: fix App.test.tsx #746
Browse files Browse the repository at this point in the history
affects: @haulmont/jmix-front-generator
  • Loading branch information
web-devel authored and vyacheslav-pushkin committed Nov 12, 2021
1 parent 302dd75 commit 93c6053
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 8 additions & 1 deletion example-react-app/src/app/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,23 @@ import App from "./App";
import { IntlProvider } from "react-intl";
import { JmixAppProvider } from "@haulmont/jmix-react-core";
import { initializeApp } from "@haulmont/jmix-rest";
import { ApolloClient, InMemoryCache } from "@apollo/client";
import { Modals } from "@haulmont/jmix-react-antd";

const jmixREST = initializeApp();
const apolloClient = new ApolloClient<unknown>({ cache: new InMemoryCache() });

const metadata = { entities: [], enums: [] };

it("renders without crashing", () => {
const div = document.createElement("div");
ReactDOM.render(
<JmixAppProvider jmixREST={jmixREST} metadata={metadata} Modals={Modals}>
<JmixAppProvider
jmixREST={jmixREST}
apolloClient={apolloClient}
metadata={metadata}
Modals={Modals}
>
<IntlProvider locale="en">
<App />
</IntlProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import App from "./App";
import { IntlProvider } from "react-intl";
import { JmixAppProvider } from "@haulmont/jmix-react-core";
import { initializeApp } from "@haulmont/jmix-rest";
import {ApolloClient, InMemoryCache} from "@apollo/client";
import { Modals } from "@haulmont/jmix-react-antd";

const jmixREST = initializeApp();
const apolloClient = new ApolloClient<unknown>({cache: new InMemoryCache()});

const metadata = { entities: [], enums: [] };

Expand All @@ -15,6 +17,7 @@ it("renders without crashing", () => {
ReactDOM.render(
<JmixAppProvider
jmixREST={jmixREST}
apolloClient={apolloClient}
metadata={metadata}
Modals={Modals}
>
Expand Down

0 comments on commit 93c6053

Please sign in to comment.