Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed

Conversation

Deepakchowdavarapu
Copy link

@Deepakchowdavarapu Deepakchowdavarapu commented Aug 5, 2024

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.

  • Rebased onto upstream/main
  • Squashed into a single commit
  • Signed-off commit

BREAKING CHANGE: None

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

dependabot bot and others added 3 commits August 5, 2024 13:09
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.60 to 0.10.66.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](sfackler/rust-openssl@openssl-v0.10.60...openssl-v0.10.66)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Deepak CH <deepak.23BCS10092@ms.sst.scaler.com>
…age pull

Primary Changes
----------------
1. Migrated all the xdai connector tests to besu ledger
   images that is being pulled from ghcr

Fixes hyperledger-cacti#3413

Signed-off-by: aldousalvarez <aldousss.alvarez@gmail.com>
Signed-off-by: Deepak CH <deepak.23BCS10092@ms.sst.scaler.com>
Signed-off-by: Deepak CH <deepak.23BCS10092@ms.sst.scaler.com>
@Deepakchowdavarapu Deepakchowdavarapu changed the title Refactor negative test cases in refund.test to use Jest assertions refactor: Refactor negative test cases in refund.test to use Jest assertions Aug 5, 2024
@Deepakchowdavarapu Deepakchowdavarapu changed the title refactor: Refactor negative test cases in refund.test to use Jest assertions Refactor: Refactor negative test cases in refund.test to use Jest assertions Aug 5, 2024
@Deepakchowdavarapu Deepakchowdavarapu changed the title Refactor: Refactor negative test cases in refund.test to use Jest assertions refactor: Refactor negative test cases in refund.test to use Jest assertions Aug 5, 2024
Copy link
Contributor

@outSH outSH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this contribution! Please read our contributing guide (https://github.com/hyperledger/cacti/blob/main/CONTRIBUTING.md) and fix the PR, for instance:

@@ -141,7 +141,7 @@
"@types/benchmark": "2.1.5",
"@types/debug": "4.1.12",
"@types/fs-extra": "11.0.4",
"@types/jest": "29.5.3",
"@types/jest": "^29.5.12",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use pinned version of dependencies (i.e. 29.5.12, without ^

@outSH
Copy link
Contributor

outSH commented Aug 7, 2024

Moved to #3464

@outSH outSH closed this Aug 7, 2024
@petermetz
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants