Skip to content

Conversation

@FrederikBolding
Copy link
Member

Add support for onProtocolRequest to snaps-jest, also adds a test to the protocol example Snap.

Closes #3187

@FrederikBolding FrederikBolding requested a review from a team as a code owner May 27, 2025 08:22
method: 'getBlockHeight',
});

expect(response).toRespondWith(expect.any(Number));
Copy link
Member Author

Choose a reason for hiding this comment

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

Would be nice to have network mocking here :/

Copy link
Member

Choose a reason for hiding this comment

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

I agree, but there's no easy way to hook into the fetch function since it's run in a separate thread 😞

@codecov
Copy link

codecov bot commented May 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.16%. Comparing base (984c277) to head (c35f45e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3422   +/-   ##
=======================================
  Coverage   98.16%   98.16%           
=======================================
  Files         402      402           
  Lines       11109    11116    +7     
  Branches     1753     1755    +2     
=======================================
+ Hits        10905    10912    +7     
  Misses        204      204           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@FrederikBolding FrederikBolding added this pull request to the merge queue May 27, 2025
Merged via the queue into main with commit 3619da5 May 27, 2025
117 checks passed
@FrederikBolding FrederikBolding deleted the fb/add-protocol-request-to-snaps-jest branch May 27, 2025 08:52
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.

Support onProtocolRequest in snaps-jest

3 participants