Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(mergeWith): include mergeWith tests from 7.x #7315

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jakovljevic-mladen
Copy link
Member

Description:
Since PR #7281 that was recently merged to 7.x branch had some tests that are helpful for current master branch, I wanted to cherry pick that commit and create a PR for it, but I failed due to fix being done in non-existing file on master branch tree. So I picked it on my own because mergeWith operator on master does not have this issue at all.

I also removed two tests from mergeWith spec file that are related to mergeAll operator. They are redundant and already exist in mergeAll spec file:

it('should merge two observables', (done) => {
const a = of(1, 2, 3);
const b = of(4, 5, 6, 7, 8);
const r = [1, 2, 3, 4, 5, 6, 7, 8];
of(a, b)
.pipe(mergeAll())
.subscribe({
next: (val) => {
expect(val).to.equal(r.shift());
},
complete: done,
});
});
it('should merge two immediately-scheduled observables', (done) => {
const a = scheduled([1, 2, 3], queueScheduler);
const b = scheduled([4, 5, 6, 7, 8], queueScheduler);
const r = [1, 2, 4, 3, 5, 6, 7, 8];
scheduled([a, b], queueScheduler)
.pipe(mergeAll())
.subscribe({
next: (val) => {
expect(val).to.equal(r.shift());
},
complete: done,
});
});

Related issue (if exists):
PR #7281

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants