Skip to content

Commit

Permalink
Extend description of test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
nichtich committed Dec 8, 2023
1 parent 5c6cc13 commit abc1162
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/suite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ Each test is an object with keys:
* `occurrence`(optional)
* either `value` or `subfields`

* `errors` an array of expected errors. If no errors are given, the validation is expected to pass.
* `errors` an array of expected errors. If no errors are given, the validation is expected to pass. Each error can have keys:

* `error message` human readable error message
* `error` error code, corresponding to the [rule number from Avram specification](https://format.gbv.de/schema/avram/specification#validation-rules) (e.g. `AR2` for an unknown field)
* `code` subfield code an error was found in
* `tag` tag of the field an error was found in
* `occurrence` occurrence of the field an error was found in
* `identifier` field identifier from the field schedule for the field an error was found in
* `pattern` regular expression that was violated
* `value` malformed or disallowed value that caused an error

* `options` an optional array of validation options, each given as string. The values are added to options given for the full test file, of available.

0 comments on commit abc1162

Please sign in to comment.