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

Updating GraphQL resolver tests #110

Merged
merged 3 commits into from
Nov 26, 2024
Merged

Updating GraphQL resolver tests #110

merged 3 commits into from
Nov 26, 2024

Conversation

45930
Copy link
Contributor

@45930 45930 commented Nov 21, 2024

Another one to reduce the complexity of reviewing #107

This PR:

  • exposes port 8282 on docker in CI, which is used by lightnet
  • improves the resolver tests
    • properly annotates the type of the graphQL response object
    • exits the process with code 1 on error instead of always exiting with code 0
    • makes use of additional describe blocks to clarify the test cases
    • explicitly test response data for correctness, rather than metadata like length only

Since there are no implementation changes here, we can be more confident about changes to the test file, then in the other PR where I do change the implementation, I will be able to leave existing tests as-is.

test('the events have the correct data', async () => {
for (let i = 0; i < numberOfEmits; i++) {
const eventData = lastBlockEvents[i]!;
// The event type is 1 and the event data is 2, 1 (Bool(true)), and the zkapp address

Choose a reason for hiding this comment

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

... 1, and the zkapp address

@45930 45930 merged commit 9dcee36 into main Nov 26, 2024
4 checks passed
@45930 45930 deleted the 2024-11-meta-update-tests branch November 26, 2024 18:44
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