mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2025-06-16 13:46:16 +02:00
Format all files with Prettier
This commit is contained in:
@ -15,7 +15,7 @@ window.AlertContext = React.createContext();
|
||||
function AlertContextMock({ children }) {
|
||||
return (
|
||||
<AlertContext.Provider value={[mockSetAlert, mockDismissAlert]}>
|
||||
{ children }
|
||||
{children}
|
||||
</AlertContext.Provider>
|
||||
);
|
||||
}
|
||||
|
@ -26,15 +26,14 @@ function Wrapper({ children }) {
|
||||
return (
|
||||
<AlertContextMock>
|
||||
<StaticRouter>
|
||||
<UIDReset>
|
||||
{children}
|
||||
</UIDReset>
|
||||
<UIDReset>{children}</UIDReset>
|
||||
</StaticRouter>
|
||||
</AlertContextMock>
|
||||
);
|
||||
}
|
||||
|
||||
const customTestRender = (ui, options) => render(ui, { wrapper: Wrapper, ...options });
|
||||
const customTestRender = (ui, options) =>
|
||||
render(ui, { wrapper: Wrapper, ...options });
|
||||
|
||||
// re-export everything
|
||||
export * from "@testing-library/react";
|
||||
|
@ -8,5 +8,7 @@
|
||||
import mockAxios from "jest-mock-axios";
|
||||
|
||||
export function mockJSONError(data) {
|
||||
mockAxios.mockError({ response: { data, headers: { "content-type": "application/json" } } });
|
||||
mockAxios.mockError({
|
||||
response: { data, headers: { "content-type": "application/json" } },
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user