Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The unit test of sotringIndexing is not correctly implemented #924

Open
Losses opened this issue Dec 5, 2022 · 0 comments
Open

The unit test of sotringIndexing is not correctly implemented #924

Losses opened this issue Dec 5, 2022 · 0 comments

Comments

@Losses
Copy link

Losses commented Dec 5, 2022

The variable len is defined here:

var len = results.length;

But the value is not replaced here:

results = rss.chain().find({b:1}).simplesort('a', { disableIndexIntercept: true }).data();
expect(len).toBe(6);
for (idx=0; idx<len-1; idx++) {
expect(loki.LokiOps.$lte(results[idx]["a"], results[idx+1]["a"]));
}

Here:

results = rss.chain().find({b:1}).simplesort('a').data();
expect(len).toBe(6);
for (idx=0; idx<len-1; idx++) {
expect(loki.LokiOps.$lte(results[idx]["a"], results[idx+1]["a"]));
}

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant