UNPKG

rxjs-marbles-with-amd

Version:

Forked version of (https://github.com/cartant/rxjs-marbles) An RxJS marble testing library for any test framework

27 lines (26 loc) 1.04 kB
import { _cases } from "../cases"; import { defaults } from "../configuration"; import { configure as _configure } from "../marbles"; export * from "../configuration"; export * from "../expect"; export * from "./fake"; export * from "./observe"; export function configure(configuration) { const { marbles } = _configure(Object.assign(Object.assign({}, configuration), { assertDeepEqual: (a, e) => expect(a).toEqual(e), frameworkMatcher: true })); function cases(name, func, cases) { describe(name, () => { _cases(c => { const t = c.only ? test.only : c.skip ? test.skip : test; if (func.length > 2) { t(c.name, marbles((m, second, ...rest) => func(m, c, second, ...rest))); } else { t(c.name, marbles((m, ...rest) => func(m, c, ...rest))); } }, cases); }); } return { cases, marbles }; } const { cases, marbles } = configure(defaults()); export { cases, marbles };