From b92f08e4b3d9b193a632a7aaa1d5ff2fa03bad7e Mon Sep 17 00:00:00 2001 From: Zachary Johnson Date: Mon, 29 Jan 2024 21:58:39 -0500 Subject: [PATCH] update Wallets.test to use the new return type of the loader --- src/components/Wallets.test.tsx | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/src/components/Wallets.test.tsx b/src/components/Wallets.test.tsx index 8d565a532..b2af2f2d9 100644 --- a/src/components/Wallets.test.tsx +++ b/src/components/Wallets.test.tsx @@ -28,7 +28,9 @@ let mockUseNavigation = { state: 'loading', } let mockUseLoaderData = { - existingWallets: [''], + existingWallets: { + wallets: [''], + }, existingWalletsError: '', } jest.mock('react-router-dom', () => { @@ -84,7 +86,9 @@ describe('', () => { }), ) mockUseLoaderData = { - existingWallets: [], + existingWallets: { + wallets: [], + }, existingWalletsError: t('wallets.error_loading_failed'), } @@ -174,7 +178,9 @@ describe('', () => { }), ) mockUseLoaderData = { - existingWallets: ['wallet0.jmdat', 'wallet1.jmdat'], + existingWallets: { + wallets: ['wallet0.jmdat', 'wallet1.jmdat'], + }, existingWalletsError: '', } mockUseNavigation = { @@ -265,7 +271,9 @@ describe('', () => { }), ) mockUseLoaderData = { - existingWallets: [dummyWalletFileName], + existingWallets: { + wallets: [dummyWalletFileName], + }, existingWalletsError: '', } mockUseNavigation = { @@ -319,7 +327,9 @@ describe('', () => { }), ) mockUseLoaderData = { - existingWallets: [dummyWalletFileName], + existingWallets: { + wallets: [dummyWalletFileName], + }, existingWalletsError: '', } mockUseNavigation = { @@ -369,7 +379,9 @@ describe('', () => { }), ) mockUseLoaderData = { - existingWallets: [dummyWalletFileName], + existingWallets: { + wallets: [dummyWalletFileName], + }, existingWalletsError: '', } mockUseNavigation = { @@ -425,7 +437,9 @@ describe('', () => { }), ) mockUseLoaderData = { - existingWallets: [dummyWalletFileName], + existingWallets: { + wallets: [dummyWalletFileName], + }, existingWalletsError: '', } mockUseNavigation = { @@ -487,7 +501,9 @@ describe('', () => { }), ) mockUseLoaderData = { - existingWallets: [dummyWalletFileName], + existingWallets: { + wallets: [dummyWalletFileName], + }, existingWalletsError: '', } mockUseNavigation = {