* Return a minimal set of options for `getRpcMethodMiddleware`. These options * are complete enough to test at least some method handlers, and they are type- * compatible. They don't represent a realistic scenario. * * @returns A minimal set of options for `getRpcMethodMiddleware`
()
| 110 | * @returns A minimal set of options for `getRpcMethodMiddleware` |
| 111 | */ |
| 112 | function getMinimalOptions() { |
| 113 | return { |
| 114 | hostname: '', |
| 115 | getProviderState: jest.fn(), |
| 116 | navigation: jest.fn(), |
| 117 | url: { current: '' }, |
| 118 | title: { current: '' }, |
| 119 | icon: { current: undefined }, |
| 120 | // Bookmarks |
| 121 | isHomepage: jest.fn(), |
| 122 | // Show autocomplete |
| 123 | fromHomepage: { current: false }, |
| 124 | toggleUrlModal: jest.fn(), |
| 125 | // Wizard |
| 126 | wizardScrollAdjusted: { current: false }, |
| 127 | // For the browser |
| 128 | tabId: '' as const, |
| 129 | // For WalletConnect |
| 130 | isWalletConnect: false, |
| 131 | // For MM SDK |
| 132 | isMMSDK: false, |
| 133 | getApprovedHosts: jest.fn(), |
| 134 | setApprovedHosts: jest.fn(), |
| 135 | approveHost: jest.fn(), |
| 136 | injectHomePageScripts: jest.fn(), |
| 137 | analytics: {}, |
| 138 | }; |
| 139 | } |
| 140 | |
| 141 | /** |
| 142 | * Return a minimal set of options for `getRpcMethodMiddleware` when used in a |
no outgoing calls
no test coverage detected