hyperledger / cacti

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

test(plugin-htlc-coordinator-besu): use Jest error assert in refund.test #3457

Open petermetz opened 1 month ago

petermetz commented 1 month ago

Description

Refactor the negative test case exception assertions so that they do not use try-catch blocks but instead declare the requirements through Jest's (and jest-extended's) own API.

The parent issue with a much more detailed explanation of what's needed and code examples on how to do it: Parent Issue: https://github.com/hyperledger/cacti/issues/3455

The test case to work on in the scope of this issue: extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/refund.test.ts

The way to run the test case: yarn jest extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/refund.test.ts

Acceptance Criteria

  1. Test passes the same as before
  2. Negative test case assertions have been migrated the way it is explained in the parent issue.
Deepakchowdavarapu commented 1 month ago

I would like to work on this issue.

petermetz commented 1 month ago

I would like to work on this issue.

@Deepakchowdavarapu You got it! Thank you in advance for the contribution!

Deepakchowdavarapu commented 1 month ago

@petermetz please review my work #3460

petermetz commented 1 month ago

@Deepakchowdavarapu Please see the reviews posted on the pull request! Let me know if you need any help with any of it and I also wanted to let you know about the daily pair programming sessions that we host which are open for everyone on the internet to come in and ask questions about Cacti: https://wiki.hyperledger.org/display/cactus/Daily+Pair+Programming+Calls