hyperledger-cacti / cacti

Hyperledger Cacti is a new approach to the blockchain interoperability problem
https://wiki.hyperledger.org/display/cactus
Apache License 2.0
344 stars 286 forks source link

refactor: Refactor negative test cases in refund.test to use Jest assertions #3460

Closed Deepakchowdavarapu closed 3 months ago

Deepakchowdavarapu commented 3 months ago

Refactor Negative Test Cases in refund.test.ts to Use Jest Assertions

Replaced try-catch blocks with Jest’s .rejects matcher for error scenarios in refund.test.ts. Updated test cases to use .toMatch and .toThrow for error assertions, improving test readability and maintainability.

Test results remain consistent, and all assertions now leverage Jest’s built-in methods.

BREAKING CHANGE: None

Signed-off-by: Deepakchowdavarapu deepak.23bcs10092@ms.sst.scaler.com

outSH commented 3 months ago

Moved to https://github.com/hyperledger/cacti/pull/3464

petermetz commented 3 months ago

@Deepakchowdavarapu Please do not open multiple PRs in the future and read the contributing.md document.