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#forkJoin no selector first empty', async () => {
const xs = empty();
const ys = of(25, 39, 42);
const zs = of(39, 42, 25);
const res = await forkJoin(xs, ys, zs);
expect(res).toBe(undefined);
});
test('AsyncIterable#forkJoin no selector last empty', async () => {
const xs = of(42, 25, 39);
const ys = of(25, 39, 42);
const zs = empty();
const res = await forkJoin(xs, ys, zs);
expect(res).toBe(undefined);
});
test('AsyncIterable#forkJoin with selector last empty', async () => {
const xs = of(42, 25, 39);
const ys = of(25, 39, 42);
const zs = empty();
const res = await forkJoin(([x, y, z]) => x + y + z, xs, ys, zs);
expect(res).toBe(undefined);
});
test('AsyncIterable#forkJoin with selector first empty', async () => {
const xs = empty();
const ys = of(25, 39, 42);
const zs = of(39, 42, 25);
const res = await forkJoin(([x, y, z]) => x + y + z, xs, ys, zs);
expect(res).toBe(undefined);
});
test('AsyncIterable#forkJoin with selector last smaller', async () => {
const xs = of(42, 25, 39);
const ys = of(25, 39, 42);
const zs = of(39, 42);
const res = await forkJoin(([x, y, z]) => x + y + z, xs, ys, zs);
expect(res).toBe(123);
});
test('AsyncIterable#forkJoin with selector middle empty', async () => {
const xs = of(42, 25, 39);
const ys = empty();
const zs = of(39, 42, 25);
const res = await forkJoin(([x, y, z]) => x + y + z, xs, ys, zs);
expect(res).toBe(undefined);
});
test('AsyncIterable#forkJoin no selector middle smaller', async () => {
const xs = of(42, 25, 39);
const ys = of(25, 39);
const zs = of(39, 42, 25);
const res = await forkJoin(xs, ys, zs);
expect(sequenceEqual(res as number[], [39, 39, 25])).toBeTruthy();
});
test('AsyncIterable#forkJoin no selector middle empty', async () => {
const xs = of(42, 25, 39);
const ys = empty();
const zs = of(39, 42, 25);
const res = await forkJoin(xs, ys, zs);
expect(res).toBe(undefined);
});