Support for spaces in marbles strings
See original GitHub issueThe following example can be read in Anatomy of a Test:
var e1 = hot('----a--^--b-------c--|');
var e2 = hot( '---d-^--e---------f-----|');
var expected = '---(be)----c-f-----|';
expectObservable(e1.merge(e2)).toBe(expected);
However, this kind of formatting is not auto-formatter friendly, and I would not follow incompatible practices. And if I recall, the Clean Code book by Robert C. Martin also advises against columned alignment.
What would work however if you let those marbles strings contain spaces. Having to trim manually is an overhead however that I would not do myself, to keep things easily readable.
Edit: I know that we already started using columned alignment in the strings. But by exceeding the boundaries of strings for columned alignment, we make this problem even worse. So all I’m saying is that we keep this special formatting inside the strings where no auto-formatter cares what we do in it.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Marble strings should ignore whitespace · Issue #81 · just-jeb/jest ...
The readme seems to suggest to align marbles using spaces, outside of the marble string: ... feat: support aligning marble strings using leading...
Read more >Testing RxJS Code with Marble Diagrams
' ' whitespace: horizontal whitespace is ignored, and can be used to help vertically align multiple marble diagrams.
Read more >Marble Syntax | Testing - RxJS Course
Let's start with a few of the basics of the marble string syntax and what each character(s) represent: Whitespace is ignored. - A...
Read more >5 Options for Anchoring Your Cello's Endpin | Strings Magazine
Cellists should always have rock-stop options on hand. Here are a few basic types of endpin holders, each with its pros and cons....
Read more >Marble Framework Home - WikiLeaks
Special characters are supported \r, \n, etc. However, when using \x in strings you must supply 4 characters in a WARBLEObfuscation Function (see...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Closing this because spaces have no meaning when the
TestScheduler
is used inrun
mode.Note that it’s only ignored when the
run
method is used. Therun
method was introduced after this issue was opened and its behaviour is very different from that of the originalTestScheduler
implementation.