More than one sequential undefined in a sequence gets skipped over
See original GitHub issueHi,
The test case below fails because more than one consecutive undefined element in a sequence gets skipped over:
const vals = ["hello", undefined, undefined, undefined, "world"];
expect(asSequence(vals).toArray()).to.deep.equal(vals);
The result with typescript 2.6.2 is
AssertionError: expected [ 'hello', undefined, 'world' ] to deeply equal [ Array(5) ]
+ expected - actual
[
"hello"
[undefined]
+ [undefined]
+ [undefined]
"world"
]
Besides this one quirk, this library has been fantastic
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Are undefined terms allowed in a sequence?
[What I do know is that if the above sequence were valid, it would be convergent (by definition), which would in turn mean...
Read more >c++ - Undefined behavior and sequence points - Stack Overflow
Informally it means that between two sequence points a variable must not be modified more than once. In an expression statement, the next...
Read more >1.13. Loops and Sequences — Hands-on Python Tutorial for ...
A dash is shown where a variable is not defined. For instance after line 1 is executed, a value is given to x,...
Read more >Sequence Points in C | Set 1 - GeeksforGeeks
The reason for undefined behavior in PROGRAM 1 is, the operator '+' doesn't have a standard defined order of evaluation for its operands....
Read more >4.16.1 Sequences - Racket Documentation
A sequence encapsulates an ordered collection of values. The elements of a sequence can be extracted with one of the for syntactic forms, ......
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 FreeTop 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
Top GitHub Comments
Thanks for explaining your usecase. I will look into this next week so we can properly support undefined values in Sequency.
davemasterdave notifications@github.com schrieb am Mi. 3. Jan. 2018 um 02:52:
@davemasterdave The issue is fixed with next version 0.19.0 which will be published soon. Sorry for the delay