(spy, opt_callCount = 1)
| 67 | * @return {!Promise} |
| 68 | */ |
| 69 | export function whenCalled(spy, opt_callCount = 1) { |
| 70 | return poll( |
| 71 | `Spy was called ${opt_callCount} times`, |
| 72 | () => spy.callCount === opt_callCount |
| 73 | ); |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * Resolves a promise when the callback returns a truthy value. |
no test coverage detected