How to test timeout() in a rxjs pipe with jasmine-marbles
问题 I have written a pipe that filters an input observable. In the pipe I specify a timeout with the timeout() operator to abort waiting if the expected value is not emitted by the source in time. I want to test the timeout case with jasmine-marbles, but I can't get it to work. I believe that expect(source).toBeObservable() evaluates before the source emits. see Stackblitz The pipe to be tested: source = cold('a', { a: { id: 'a' } }).pipe( timeout(500), filter((a) => false), catchError((err) => {