Verify that `xpath` produces `-0` consistent with spec
- Dominant language
- TypeScript
- Stars
- 38
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
In #111, a few assertion swaps surfaced the fact that certain XPath expressions evaluate to `-0`, and that the Chai-style assertions did not distinguish that from `0`. As noted in review there, each of those cases were either:
- Inferred correct by extrapolating from the underlying W3C XPath spec to the ODK extension thereof
- Inferred correct, where the spec isn't detailed, by comparing with native behavior
We should do a more thorough pass through the existing test cases to:
1. Validate and/or fix any other expressions that would be expected to produce `-0`, with the same reasoning
2. Ensure there is coverage for any other clear cases identified in the spec
This is probably not the most important bit of minutiae in the world, and isn't a particularly high priority (unless it becomes important to users for some specific use case where `-0` is important to distinguish in a real form). I'm filing this mostly in the spirit of adherence to spec. But part of the motivation is also that thoroughness of this kind can sometimes surface other related issues that might be more important.
Contributor guide
No contributing guide indexed for this repository
Research direction
Begin by reviewing the existing XPath test cases and the Chai-style assertions referenced in the issue, then compare each relevant result with the W3C XPath spec and native behavior. Done means correcting any mismatches and adding coverage for every clear -0 case identified, with the relevant tests passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100