Skip to content

Commit

Permalink
Add token registry mock to the unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidTranDucVL committed Jul 20, 2021
1 parent 89dbf96 commit 508cd36
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/tests/src/common/mock.js
Expand Up @@ -301,6 +301,17 @@ const mock = (ADALITE_CONFIG) => {
})
}

function mockTokenRegistry() {
fetchMock.mock({
matcher: `begin:${ADALITE_CONFIG.ADALITE_BLOCKCHAIN_EXPLORER_URL}/api/tokenRegistry/getTokensMetadata/`,
response: {
status: 200,
body: [],
sendAsJson: true,
},
})
}

return {
mockBulkAddressSummaryEndpoint,
mockGetAccountInfo,
Expand All @@ -316,6 +327,7 @@ const mock = (ADALITE_CONFIG) => {
mockWithdrawalHistory,
mockRewardHistory,
mockPoolRecommendation,
mockTokenRegistry,
clean,
}
}
Expand Down

0 comments on commit 508cd36

Please sign in to comment.