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

Why does #every return false on the empty store #391

Closed
jeswr opened this issue Jul 28, 2024 · 2 comments · Fixed by #392
Closed

Why does #every return false on the empty store #391

jeswr opened this issue Jul 28, 2024 · 2 comments · Fixed by #392
Labels

Comments

@jeswr
Copy link
Collaborator

jeswr commented Jul 28, 2024

As shown in the test here #every returns false when called on an empty store. There is a test enforcing this behavior at

expect(store.every(alwaysTrue, null, null, null, null)).toBe(false);
This does not align with set semantics where #every would align with forAll and thus be vacuously true on the empty set.

It also goes against the RDF/JS Dataset definition of for #every https://rdf.js.org/dataset-spec/#dom-dataset-every; and so in order to complete #288 we would need to alter this behavior and decide whether this change is (1) breaking or (2) a bug fix - despite the fact that there is a test enforcing the buggy behavior. @RubenVerborgh what do you think?

@RubenVerborgh
Copy link
Member

Oops; let's treat as a bug fix. The test is wrong indeed.

Copy link

🎉 This issue has been resolved in version 1.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

2 participants