Skip to content
Snippets Groups Projects
Verified Commit ca7cab88 authored by Maciej Lenartowicz's avatar Maciej Lenartowicz
Browse files

Renamed test utils

parent 347fbbd5
1 merge request!29Global alert
Pipeline #54869 passed with stages
in 1 minute and 51 seconds
......@@ -70,4 +70,4 @@ export { AlertContext, AlertContextProvider, useAlert } from "alertContext/Alert
// Testing utilities
export { mockJSONError } from "testUtils/network";
export { setAlert, dismissAlert } from "testUtils/alertContextMock";
export { mockSetAlert, mockDismissAlert } from "testUtils/alertContextMock";
......@@ -9,15 +9,15 @@ import React from "react";
import { AlertContext } from "../alertContext/AlertContext";
const setAlert = jest.fn();
const dismissAlert = jest.fn();
const mockSetAlert = jest.fn();
const mockDismissAlert = jest.fn();
function AlertContextMock({ children }) {
return (
<AlertContext.Provider value={[setAlert, dismissAlert]}>
<AlertContext.Provider value={[mockSetAlert, mockDismissAlert]}>
{ children }
</AlertContext.Provider>
);
}
export { AlertContextMock, setAlert, dismissAlert };
export { AlertContextMock, mockSetAlert, mockDismissAlert };
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment