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

caliper-core: add tests for Message classes #1561

Merged
merged 2 commits into from
May 15, 2024

Conversation

EshaanAgg
Copy link
Contributor

This PR introduces the tests for the base Message class in caliper-core, and then introduces three similar test suites for the constructors of three types of messages. When approved, I can work on adding similar tests for all the message classes.

Checklist

  • A link to the issue/user story that the pull request relates to
  • How to recreate the problem without the fix
  • Design of the fix
  • How to prove that the fix works
  • Automated tests that prove the fix keeps on working
  • Documentation - any JSDoc, website, or Stackoverflow answers?

Issue/User story

Fixes part of #1557

Steps to Reproduce

Existing issues

Design of the fix

Validation of the fix

Automated Tests

What documentation has been provided for this pull request

@EshaanAgg EshaanAgg requested a review from a team May 1, 2024 09:39
@davidkel
Copy link
Contributor

davidkel commented May 2, 2024

@aklenik Can you take a look

@davidkel
Copy link
Contributor

davidkel commented May 4, 2024

On a quick glance, these seem ok to me, but really want @aklenik to take a look as he is more familiar with this part of the code I think

})
})

describe("forRecipient", () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

We need tests to show that it returns false as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad for missing this case! I have updated the test suite for the same. Thanks!

Copy link
Contributor

@davidkel davidkel left a comment

Choose a reason for hiding this comment

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

One comment around a couple more tests being required, but these seem reasonable to me.

EshaanAgg added 2 commits May 9, 2024 19:39
Signed-off-by: Eshaan Aggarwal <[email protected]>
Signed-off-by: Eshaan Aggarwal <[email protected]>
@EshaanAgg EshaanAgg requested a review from davidkel May 9, 2024 14:10
Copy link
Contributor

@davidkel davidkel left a comment

Choose a reason for hiding this comment

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

Looks good to me, many thanks for the contribution

@davidkel davidkel merged commit 6c899ad into hyperledger-caliper:main May 15, 2024
16 checks passed
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.

2 participants