* Returns a method that rejects on its fourth call. * @return {function():!Promise }
()
| 230 | * @return {function():!Promise<number>} |
| 231 | */ |
| 232 | function getErrorFunction() { |
| 233 | const errorFunction = sandbox.stub(); |
| 234 | errorFunction.rejects(); |
| 235 | errorFunction |
| 236 | .onCall(0) |
| 237 | .resolves(0) |
| 238 | .onCall(1) |
| 239 | .resolves(1) |
| 240 | .onCall(2) |
| 241 | .resolves(2) |
| 242 | .onCall(3) |
| 243 | .resolves(3); |
| 244 | return errorFunction; |
| 245 | } |
| 246 | |
| 247 | /** |
| 248 | * Simulate the WebDriver polling functionality to get the latest value |
nothing calls this directly
no outgoing calls
no test coverage detected