techfort / LokiJS

javascript embeddable / in-memory database
http:/techfort.github.io/LokiJS
MIT License
6.71k stars 478 forks source link

The unit test of `sotringIndexing` is not correctly implemented #924

Open Losses opened 1 year ago

Losses commented 1 year ago

The variable len is defined here: https://github.com/techfort/LokiJS/blob/25b9a33d57509717d43b4da06d92064f2b7a6c95/spec/generic/sortingIndexing.spec.js#L307

But the value is not replaced here: https://github.com/techfort/LokiJS/blob/25b9a33d57509717d43b4da06d92064f2b7a6c95/spec/generic/sortingIndexing.spec.js#L316-L320

Here: https://github.com/techfort/LokiJS/blob/25b9a33d57509717d43b4da06d92064f2b7a6c95/spec/generic/sortingIndexing.spec.js#L323-L327

The code is testing the same result for three times, which is incorrect.