mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2025-06-16 13:46:16 +02:00
Use global AlertContext
This commit is contained in:
@ -7,11 +7,11 @@
|
||||
|
||||
import React from "react";
|
||||
|
||||
import { AlertContext } from "../alertContext/AlertContext";
|
||||
|
||||
const mockSetAlert = jest.fn();
|
||||
const mockDismissAlert = jest.fn();
|
||||
|
||||
window.AlertContext = React.createContext();
|
||||
|
||||
function AlertContextMock({ children }) {
|
||||
return (
|
||||
<AlertContext.Provider value={[mockSetAlert, mockDismissAlert]}>
|
||||
|
Reference in New Issue
Block a user