You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When `methodName` is next invoked, the `Promise` (that is returned from the `methodName`) will be resolved with the specified `result`. This is useful for testing specific results of firebase messaging (e. g. partial success of sending messaging). The result will be triggered with the next `flush`.
257
+
258
+
If no result is specified, `methodName` will resolve a default response.
259
+
260
+
`result` must not be undefined.
261
+
262
+
<hr>
263
+
264
+
##### `failNext(methodName, err)` -> `undefined`
265
+
266
+
When `methodName` is next invoked, the `Promise` will be rejected with the specified `err`. This is useful for simulating validation or any other errors. The error will be triggered with the next `flush`.
267
+
268
+
`err` must be a proper `Error` object and not a string or any other primitive.
269
+
270
+
<hr>
271
+
272
+
##### `on(methodName, callback)` -> `undefined`
273
+
274
+
When `methodName` is next invoked, the `callback` will be triggered. The callback gets an array as argument. The array contains all arguments, that were passed on invoking `methodName`. This is useful to assert the input arguments of `methodName`.
0 commit comments