(sandbox)
| 50 | } |
| 51 | |
| 52 | export function mockWindowInterface(sandbox) { |
| 53 | const methods = Object.getOwnPropertyNames(WindowInterface).filter( |
| 54 | (p) => typeof WindowInterface[p] === 'function' |
| 55 | ); |
| 56 | const mock = {}; |
| 57 | methods.forEach((method) => { |
| 58 | mock[method] = sandbox.stub(WindowInterface, method); |
| 59 | }); |
| 60 | return mock; |
| 61 | } |
| 62 | |
| 63 | /** |
| 64 | * Resolves a promise when a spy has been called a configurable number of times. |
no test coverage detected