The code change in lib/JSON/Validator.pm appears to be redundant at
the moment, as the tests passed without it, but I'm putting it there
anyway so that any future internals changes that affect ordering don't
suddenly start causing test failures.
Summary
The list of errors spat out by ...->validate() are now guaranteed to be in
a predictable order, which is documented.
Motivation
Documenting the order of errors makes it easier to write tests for error conditions.
The code change in lib/JSON/Validator.pm appears to be redundant at the moment, as the tests passed without it, but I'm putting it there anyway so that any future internals changes that affect ordering don't suddenly start causing test failures.
Summary
The list of errors spat out by
...->validate()
are now guaranteed to be in a predictable order, which is documented.Motivation
Documenting the order of errors makes it easier to write tests for error conditions.
References
https://github.com/mojolicious/json-validator/issues/222