Skip to content

Test(data): add test coverage for getEvents utility #989

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

Merged

Conversation

cesarhenrq
Copy link
Contributor

re #986

Description

Adds test coverage for the getEvents utility function in the data package.

Changes

  • Created new test file getEvents.test.ts
  • Added test cases for basic event fetching
  • Added test cases for filter arguments
  • Added test cases for startBlock parameter
  • Added test cases for edge cases (empty arrays, undefined args)
  • Added test cases for error handling

Testing

  • All tests are passing
  • Edge cases are properly handled

Related Issue(s)

Closes #986

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have run yarn format and yarn lint without getting any errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Important

We do not accept pull requests for minor grammatical fixes (e.g., correcting typos, rewording sentences) or for fixing broken links, unless they significantly improve clarity or functionality. These contributions, while appreciated, are not a priority for merging. If you notice any of these issues, please create a GitHub Issue to report them so they can be properly tracked and addressed.

Copy link
Member

@vplasencia vplasencia left a comment

Choose a reason for hiding this comment

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

Hey @cesarhenrq! Great work 🚀

Thank you very much for creating this PR.

@vplasencia vplasencia merged commit b56e969 into semaphore-protocol:main May 26, 2025
5 checks passed
Copy link

gitpoap-bot bot commented May 26, 2025

Congrats, your important contribution to this open-source project has earned you a GitPOAP!

GitPOAP: 2025 Semaphore Contributor:

GitPOAP: 2025 Semaphore Contributor GitPOAP Badge

Head to gitpoap.io & connect your GitHub account to mint!

Learn more about GitPOAPs here.

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.

Achieve 100% coverage in the @semaphore-protocol/data
2 participants