You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would also dramatically simplify the effort needed to test new services. The base service policy we have is complex to test, and we're re-testing various conditions over and over with each new service. If we implemented the basic service pattern in a shared function, we could test it exhaustively just in that function, and focus on service-specific logic in our tests for each service.
The text was updated successfully, but these errors were encountered:
If in implementing the RPC service class in #4990 we need to create a separate policy object for each RPC endpoint, then it seems that to satisfy this ticket it would make the most sense to create a function that would construct and return the policy.
Each of our services that follow the pattern outlined in https://github.com/MetaMask/decisions/blob/main/decisions/core/0002-external-api-integrations.md have a chunk of boilerplate that is identical for each service. We can make services easier to write by refactoring our existing services to use a common function for these boilerplate setup steps.
This would also dramatically simplify the effort needed to test new services. The base service policy we have is complex to test, and we're re-testing various conditions over and over with each new service. If we implemented the basic service pattern in a shared function, we could test it exhaustively just in that function, and focus on service-specific logic in our tests for each service.
The text was updated successfully, but these errors were encountered: