diff --git a/ui/hooks/metamask-notifications/useProfileSyncing.test.tsx b/ui/hooks/metamask-notifications/useProfileSyncing.test.tsx
index 951cec333ade..298e442acd19 100644
--- a/ui/hooks/metamask-notifications/useProfileSyncing.test.tsx
+++ b/ui/hooks/metamask-notifications/useProfileSyncing.test.tsx
@@ -1,9 +1,11 @@
-import React from 'react';
+import React, { ReactNode } from 'react';
import { Provider } from 'react-redux';
+import { Store } from 'redux';
import { renderHook, act } from '@testing-library/react-hooks';
import configureStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import { waitFor } from '@testing-library/react';
+import { MetamaskNotificationsProvider } from '../../contexts/metamask-notifications';
import * as actions from '../../store/actions';
import {
useEnableProfileSyncing,
@@ -77,12 +79,26 @@ const arrangeMocks = (
return { store };
};
+const RenderWithProviders = ({
+ store,
+ children,
+}: {
+ store: Store;
+ children: ReactNode;
+}) => (
+
+ {children}
+
+);
+
describe('useProfileSyncing', () => {
it('should enable profile syncing', async () => {
const { store } = arrangeMocks();
const { result } = renderHook(() => useEnableProfileSyncing(), {
- wrapper: ({ children }) => {children},
+ wrapper: ({ children }) => (
+ {children}
+ ),
});
act(() => {
@@ -96,7 +112,9 @@ describe('useProfileSyncing', () => {
const { store } = arrangeMocks();
const { result } = renderHook(() => useDisableProfileSyncing(), {
- wrapper: ({ children }) => {children},
+ wrapper: ({ children }) => (
+ {children}
+ ),
});
act(() => {
@@ -113,7 +131,9 @@ describe('useProfileSyncing', () => {
});
renderHook(() => useAccountSyncingEffect(), {
- wrapper: ({ children }) => {children},
+ wrapper: ({ children }) => (
+ {children}
+ ),
});
await waitFor(() => {
@@ -125,7 +145,9 @@ describe('useProfileSyncing', () => {
const { store } = arrangeMocks();
renderHook(() => useAccountSyncingEffect(), {
- wrapper: ({ children }) => {children},
+ wrapper: ({ children }) => (
+ {children}
+ ),
});
await waitFor(() => {
@@ -142,7 +164,7 @@ describe('useProfileSyncing', () => {
() => useDeleteAccountSyncingDataFromUserStorage(),
{
wrapper: ({ children }) => (
- {children}
+ {children}
),
},
);