forked from MetaMask/providers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The mocks used in the external provider unit tests have been rewritten to allow sending and inspecting messages in either direction. They also no longer rely upon mocking out internal methods. The `getInitializedInpageProvider` helper function in the inpage provider tests has been updated with method callbacks, to allow tests to setup replies for specific messages. This will be used in a future PR. The return type of `getInitializedProvider` is now an object rather than a tuple. This was done to improve readability. Now it's more clear exactly what each property is without close inspection. The return type has been improved as well. Beforehand it was inferred by TypeScript, but now it is explicitly declared as a type and documented. One additional test was added to ensure the `isMetaMask` property is set on the inpage provider.
- Loading branch information
Showing
7 changed files
with
361 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.