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

Marble diagrams incorrectly including ) from value groups in tick counts #3254

Closed
benlesh opened this issue Jan 23, 2018 · 4 comments
Closed
Assignees

Comments

@benlesh
Copy link
Member

benlesh commented Jan 23, 2018

RxJS version: 5.x

Code to reproduce:

When using the test scheduler create a marble-based observable with a group

More details can be found in this PR: #2932, which we are closing in favor of @kwonoj's upcoming merging of rx-sandbox.

Basically marbles that look like this:

---(ab)---(cd)--|
Expected behavior:

{ time: 30, type: 'N', value: a },
{ time: 30, type: 'N',  value: b },
{ time: 70, type: 'N', value: c },
{ time: 70, type: 'N',  value: d },
{ time: 100, type: 'C' },

Actual behavior:

{ time: 30, type: 'N', value: a },
{ time: 30, type: 'N',  value: b },
{ time: 80, type: 'N', value: c },
{ time: 80, type: 'N',  value: d },
{ time: 110, type: 'C' },

Additional information:
The above structures are just pseudo code (clearly) lol.

See #2932

Also use rx-sandbox for marble tests, if you even need them at all.

@benlesh benlesh added the bug Confirmed bug label Jan 25, 2018
@benlesh
Copy link
Member Author

benlesh commented Jan 25, 2018

This is apparently handled by rx-sandbox, which we're going to move into RxJS proper.

Assigning to @kwonoj

cc @jayphelps

@kwonoj
Copy link
Member

kwonoj commented Jan 25, 2018

I'll propose small pr convert one of our tests using new module as devdeps. (eventually it could go in monorepo, or other ways around but as an immediate workaround.)

@kazinov
Copy link

kazinov commented May 18, 2018

Hello,

I started writing marble tests for my application and I realised that I can't test observables like this:

const observable$ = of(1, 2).concat(of(3, 4).delay(20));

If I understood correctly, the current marbles syntax just doesn't allow me to do this.
I guess it should be '(ab)-(cd)', but it's not (c and d emitted on frame 50, not 20).

What is the recommend way to work around it?
Is there any plan to fix this problem or should I start using rx-sandbox?

I also created a stack overflow question

Thanks!

@benlesh benlesh removed the bug Confirmed bug label Aug 20, 2020
@benlesh
Copy link
Member Author

benlesh commented Aug 20, 2020

I believe this is covered by TestScheduler.run mode now, and we can close this.

@benlesh benlesh closed this as completed Aug 20, 2020
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

No branches or pull requests

3 participants