* Returns a method that resolves the numbers 0 through 6. * @return {function():!Promise }
()
| 206 | * @return {function():!Promise<number>} |
| 207 | */ |
| 208 | function getValueFunction() { |
| 209 | const valueFunction = sandbox.stub(); |
| 210 | valueFunction.resolves(6); |
| 211 | valueFunction |
| 212 | .onCall(0) |
| 213 | .resolves(0) |
| 214 | .onCall(1) |
| 215 | .resolves(1) |
| 216 | .onCall(2) |
| 217 | .resolves(2) |
| 218 | .onCall(3) |
| 219 | .resolves(3) |
| 220 | .onCall(4) |
| 221 | .resolves(4) |
| 222 | .onCall(5) |
| 223 | .resolves(5); |
| 224 | |
| 225 | return valueFunction; |
| 226 | } |
| 227 | |
| 228 | /** |
| 229 | * Returns a method that rejects on its fourth call. |
nothing calls this directly
no outgoing calls
no test coverage detected