Add SIgn in form snapshot test
This commit is contained in:
19
src/components/contexts/__mocks__/UserContext.jsx
Normal file
19
src/components/contexts/__mocks__/UserContext.jsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import React from 'react';
|
||||
|
||||
export const UserProvider = ({ children }) => {
|
||||
return (
|
||||
<div data-testid="mocked-userprovider">
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export const useUserContext = () => ({
|
||||
fetching: false,
|
||||
token: null,
|
||||
error: null,
|
||||
setError: jest.fn(),
|
||||
signIn: jest.fn(),
|
||||
signUp: jest.fn(),
|
||||
signOut: jest.fn(),
|
||||
});
|
||||
Reference in New Issue
Block a user