[testing] Marbles in error messages of tests
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 31.7k
- Forks
- 3k
- PR merge metrics
- No merged PRs in 30d
Description
Feature Request - Marbles in testing
Is your feature request related to a problem? Please describe.
When working on operators in the RxJS source you need to parse errors like this:
AssertionError:
Expected
{"frame":10,"notification":{"kind":"N","value":"a","hasValue":true}}
{"frame":100,"notification":{"kind":"N","value":"b","hasValue":true}}
{"frame":160,"notification":{"kind":"N","value":"c","hasValue":true}}
{"frame":210,"notification":{"kind":"C","hasValue":false}}
to deep equal
{"frame":10,"notification":{"kind":"N","value":"y","hasValue":true}}
{"frame":100,"notification":{"kind":"N","value":"b","hasValue":true}}
{"frame":160,"notification":{"kind":"N","value":"c","hasValue":true}}
{"frame":210,"notification":{"kind":"C","hasValue":false}}
These errors are hard to read/understand.
Describe the solution you'd like
I would like to propose replacing or amending the messages with marbles.
E.g.
AssertionError:
Expected
-a--------b-----c----C
to deep equal
-y--------b-----c----C
I've already implemented a POC here.
My question is: do the developers of RxJS want this? If so, are there any requests/objections/comments.
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
Review the linked proof-of-concept branch for its marble-based error output and compare it with the current RxJS test failures described in the issue. Before starting implementation, confirm with the maintainers whether this behavior is wanted and what output and test coverage would define completion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100