Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test('AsyncIterable#concat behavior', async () => {
const res = concat(of(1, 2, 3), of(4, 5));
expect(await sequenceEqual(res, of(1, 2, 3, 4, 5))).toBeTruthy();
});
test('AsyncIterable#catch with concat error', async () => {
const res = catchError(concat(range(0, 5), throwError(new Error())), range(5, 5));
expect(await sequenceEqual(res, range(0, 10))).toBeTruthy();
});
test('AsyncIterable#pipe writable-stream empty', async () => {
expect(
await sequenceEqual(empty(), empty().pipe(map((s, i) => s.length + i)))
).toBeTruthy();
});
test('AsyncIterable#concat concatAll behavior', async () => {
const res = of(of(1, 2, 3), of(4, 5)).pipe(concatAll());
expect(await sequenceEqual(res, of(1, 2, 3, 4, 5))).toBeTruthy();
});
test('AsyncIterable#merge mergeAll behavior', async () => {
const res = of(of(1, 2, 3), of(4, 5)).pipe(mergeAll());
expect(await sequenceEqual(res, of(1, 2, 3, 4, 5))).toBeTruthy();
});
test('AsyncIterable#onErrorResumeNext continues without error', async () => {
const xs = of(1, 2);
const ys = of(3, 4);
const res = onErrorResumeNext(xs, ys);
expect(await sequenceEqual(res, of(1, 2, 3, 4))).toBeTruthy();
});
test('AsyncIterable#merge behavior', async () => {
const res = merge(of(1, 2, 3), of(4, 5));
expect(await sequenceEqual(res, of(1, 2, 3, 4, 5))).toBeTruthy();
});