Skip to content

Commit

Permalink
Updated test
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiaMineJP committed Sep 12, 2024
1 parent 146d8ca commit 9122fee
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,20 @@ describe('createOfferForIdsToOfferBuilderData', () => {

// call to createOfferForIdsToOfferBuilderData should throw an error
expect(() => createOfferForIdsToOfferBuilderData(walletIdsAndAmounts as any, (() => {}) as any)).toThrow(
/Invalid value for/,
/Invalid amount /,
);
});
});
describe('when the amount is null', () => {
it('should throw an error', () => {
const walletIdsAndAmounts = {
1: null,
2: -1234,
};

// call to createOfferForIdsToOfferBuilderData should throw an error
expect(() => createOfferForIdsToOfferBuilderData(walletIdsAndAmounts as any, (() => {}) as any)).toThrow(
/Amount is not set for walletId(assetId):/,
);
});
});
Expand Down

0 comments on commit 9122fee

Please sign in to comment.