Skip to content

Commit

Permalink
update Wallets.test to use the new return type of the loader
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Johnson committed Jan 30, 2024
1 parent 6875b5b commit b92f08e
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions src/components/Wallets.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ let mockUseNavigation = {
state: 'loading',
}
let mockUseLoaderData = {
existingWallets: [''],
existingWallets: {
wallets: [''],
},
existingWalletsError: '',
}
jest.mock('react-router-dom', () => {
Expand Down Expand Up @@ -84,7 +86,9 @@ describe('<Wallets />', () => {
}),
)
mockUseLoaderData = {
existingWallets: [],
existingWallets: {
wallets: [],
},
existingWalletsError: t('wallets.error_loading_failed'),
}

Expand Down Expand Up @@ -174,7 +178,9 @@ describe('<Wallets />', () => {
}),
)
mockUseLoaderData = {
existingWallets: ['wallet0.jmdat', 'wallet1.jmdat'],
existingWallets: {
wallets: ['wallet0.jmdat', 'wallet1.jmdat'],
},
existingWalletsError: '',
}
mockUseNavigation = {
Expand Down Expand Up @@ -265,7 +271,9 @@ describe('<Wallets />', () => {
}),
)
mockUseLoaderData = {
existingWallets: [dummyWalletFileName],
existingWallets: {
wallets: [dummyWalletFileName],
},
existingWalletsError: '',
}
mockUseNavigation = {
Expand Down Expand Up @@ -319,7 +327,9 @@ describe('<Wallets />', () => {
}),
)
mockUseLoaderData = {
existingWallets: [dummyWalletFileName],
existingWallets: {
wallets: [dummyWalletFileName],
},
existingWalletsError: '',
}
mockUseNavigation = {
Expand Down Expand Up @@ -369,7 +379,9 @@ describe('<Wallets />', () => {
}),
)
mockUseLoaderData = {
existingWallets: [dummyWalletFileName],
existingWallets: {
wallets: [dummyWalletFileName],
},
existingWalletsError: '',
}
mockUseNavigation = {
Expand Down Expand Up @@ -425,7 +437,9 @@ describe('<Wallets />', () => {
}),
)
mockUseLoaderData = {
existingWallets: [dummyWalletFileName],
existingWallets: {
wallets: [dummyWalletFileName],
},
existingWalletsError: '',
}
mockUseNavigation = {
Expand Down Expand Up @@ -487,7 +501,9 @@ describe('<Wallets />', () => {
}),
)
mockUseLoaderData = {
existingWallets: [dummyWalletFileName],
existingWallets: {
wallets: [dummyWalletFileName],
},
existingWalletsError: '',
}
mockUseNavigation = {
Expand Down

0 comments on commit b92f08e

Please sign in to comment.