arogozine / LinqToTypeScript

LINQ to TypeScript
https://arogozine.github.io/linqtotypescript/
MIT License
139 stars 18 forks source link

IEnumerable Min returns wrong result #22

Closed HadriMX closed 2 years ago

HadriMX commented 2 years ago

For some reason, min method in IEnumerable<TSource> returns a wrong result. You can see here, with this test that fails:

itEnumerable("Min", (asEnumerable) => { expect(asEnumerable([1, 2, 0, 1, 3, 4, 9, 8, 5]).min()).toBe(0) })

image

arogozine commented 2 years ago

Considering this works for me and works for Azure Pipelines, I'm going to need more information, image

HadriMX commented 2 years ago

Sorry for the late response. The test as they are do work, but I meant if you change this test in particular to what I did in my screenshot, it will fail. I think it has to do with having a 0 among the values?

arogozine commented 2 years ago

Squeezed a fix into 11.0.0-beta release