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 d2009e3
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 /,
);
});
});
Expand Down

0 comments on commit d2009e3

Please sign in to comment.