Function marbleTest

  • A helper to take some boilerplate out of RxJS's marble testing API.

    it("doubles numbers", marbleTest(({ cold, expectObservable }) => {
    const source = cold("-1-2-3-|");
    const expected = " -2-4-6-|");
    expectObservable(source.pipe(double())).toBe(expected);
    }));

    Type Parameters

    • T

    Parameters

    • callback: Callback<T>

    Returns (() => T)

      • (): T
      • Returns T