(pluginClassName: string, methodName: string)
| 338 | }; |
| 339 | |
| 340 | const mockAndroidPlugin = (pluginClassName: string, methodName: string) => { |
| 341 | const w: any = win; |
| 342 | w.Capacitor = w.Capacitor ?? {}; |
| 343 | w.Capacitor.PluginHeaders = w.Capacitor.PluginHeaders ?? []; |
| 344 | w.Capacitor.PluginHeaders.push({ |
| 345 | name: pluginClassName, |
| 346 | methods: [ |
| 347 | { name: methodName, rtype: 'promise' }, |
| 348 | { name: 'addListener' }, |
| 349 | { name: 'removeListener' }, |
| 350 | { name: 'removeAllListeners' }, |
| 351 | ], |
| 352 | }); |
| 353 | }; |
| 354 | }); |
| 355 | |
| 356 | interface AwesomePlugin extends Plugin { |