We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
.expectErors()
1 parent f7dc6c1 commit 21322d0Copy full SHA for 21322d0
README.md
@@ -341,12 +341,12 @@ it('should spy on Observable errors', () => {
341
const fakeObservable = throwError('OOPS');
342
343
const observerSpy = new ObserverSpy({expectErrors: true}); // <-- IMPORTANT
344
+ // OR
345
+ const observerSpy = new ObserverSpy().expectErrors(); // <-- ALTERNATIVE WAY TO SET IT
346
- // BTW, this could also be set like this:
347
+ // Or even...
348
observerSpy.expectErrors(); // <-- ALTERNATIVE WAY TO SET IT
- // or even like this:
- observerSpy = new ObserverSpy().expectErrors(); // <-- ALTERNATIVE WAY TO SET IT
349
-
+
350
fakeObservable.subscribe(observerSpy);
351
352
expect(observerSpy.receivedError()).toBe(true);
0 commit comments