How to use the rxjs-marbles/mocha.cases function in rxjs-marbles

To help you get started, we’ve selected a few rxjs-marbles examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cartant / rxjs-marbles / examples / mocha / cases-spec.ts View on Github external
describe("cases", () => {
  cases(
    "should support cases",
    (m, c) => {
      const source = m.hot(c.s);
      const expected = m.cold(c.e);
      const destination = source.pipe(
        map(value => String.fromCharCode(value.charCodeAt(0) + 1))
      );

      m.expect(destination).toBeObservable(expected);
    },
    {
      empty: {
        s: "-|",
        e: "-|"
      },
      "non-empty": {