Skip to content

Conversation

@GuillaumeRx
Copy link
Contributor

This PR moves the handlers related code to the handlers folder in snaps-utils to debloat the handlers.ts file.

@GuillaumeRx GuillaumeRx requested a review from a team as a code owner April 1, 2025 12:37
@codecov
Copy link

codecov bot commented Apr 1, 2025

Codecov Report

Attention: Patch coverage is 12.50000% with 14 lines in your changes missing coverage. Please review.

Project coverage is 94.87%. Comparing base (e90f300) to head (4a1e807).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
packages/snaps-utils/src/handlers/name-lookup.ts 0.00% 5 Missing ⚠️
packages/snaps-utils/src/handlers/transaction.ts 0.00% 4 Missing ⚠️
packages/snaps-utils/src/handlers/home-page.ts 0.00% 3 Missing ⚠️
packages/snaps-utils/src/handlers/settings-page.ts 0.00% 1 Missing ⚠️
packages/snaps-utils/src/handlers/signature.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3289      +/-   ##
==========================================
- Coverage   94.99%   94.87%   -0.13%     
==========================================
  Files         512      517       +5     
  Lines       11331    11333       +2     
  Branches     1747     1748       +1     
==========================================
- Hits        10764    10752      -12     
- Misses        567      581      +14     

☔ 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.

@GuillaumeRx
Copy link
Contributor Author

Codecov Report

Attention: Patch coverage is 12.50000% with 14 lines in your changes missing coverage. Please review.

Project coverage is 94.87%. Comparing base (e90f300) to head (4a1e807).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/snaps-utils/src/handlers/name-lookup.ts 0.00% 5 Missing ⚠️
packages/snaps-utils/src/handlers/transaction.ts 0.00% 4 Missing ⚠️
packages/snaps-utils/src/handlers/home-page.ts 0.00% 3 Missing ⚠️
packages/snaps-utils/src/handlers/settings-page.ts 0.00% 1 Missing ⚠️
packages/snaps-utils/src/handlers/signature.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
☔ View full report in Codecov by Sentry. 📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:

All those things were not tested before, we would need to bring JSX support in snaps-utils to cover everything as some of them validate handlers that uses Snaps UI

@FrederikBolding
Copy link
Member

All those things were not tested before, we would need to bring JSX support in snaps-utils to cover everything as some of them validate handlers that uses Snaps UI

I believe they are all tested in snaps-execution-environments via a browser test, but not reflected in coverage. Can you verify?

@GuillaumeRx
Copy link
Contributor Author

All those things were not tested before, we would need to bring JSX support in snaps-utils to cover everything as some of them validate handlers that uses Snaps UI

I believe they are all tested in snaps-execution-environments via a browser test, but not reflected in coverage. Can you verify?

They are indeed: https://github.com/MetaMask/snaps/blob/27f1def96ffe0779df13ab3346dbc52b11229624/packages/snaps-execution-environments/src/common/BaseSnapExecutor.test.browser.ts

@GuillaumeRx GuillaumeRx added this pull request to the merge queue Apr 2, 2025
Merged via the queue into main with commit d5c9158 Apr 2, 2025
170 of 172 checks passed
@GuillaumeRx GuillaumeRx deleted the gr/move-handlers branch April 2, 2025 08:27
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