Limitation in marble testing use cases due to grouping semantics
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 31.7k
- Forks
- 3k
- PR merge metrics
- No merged PRs in 30d
Description
Feature Request
Is your feature request related to a problem? Please describe.
While it can be unintuitive at first, after all the values have synchronously emitted time will progress a number of frames equal to the number of ASCII characters in the group, including the parentheses. e.g. '(abc)' will emit the values of a, b, and c synchronously in the same frame and then advance virtual time by 5 frames, '(abc)'.length === 5. This is done because it often helps you vertically align your marble diagrams
It is therefore impossible to use marbles to test that pairs of values are emitted in subsequent frames. I would propose making this behavior configurable or making a breaking change to revert it. The rationale, people who want to visually align things can still do so (eg by adding spaces, or writing their test around the visual alignment). Contrast this with people who don't care about visual alignment, but want to be able to test some logic that must work this way (pairs of values on subsequent ticks). I for one disagree its a good tradeoff to make certain use cases impossible for the sake of making visual alignment easier.
Describe the solution you'd like
Have an option to change, or make a breaking change so it uses 1 tick when there are groupings. Users can use spaces to create alignment, or the users who insist on visual alignment can contort their tests instead of imposing this "contortion" on the use cases that marbles can possibly test
Describe alternatives you've considered
N/a, other than working around by not testing this use case at all
Additional context

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the RxJS marble-testing implementation and tests for grouping semantics; the issue names no specific files or entry points. Done means grouped values can be scheduled on consecutive frames through a documented option or an agreed breaking change, with tests covering the selected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100