-
-
Notifications
You must be signed in to change notification settings - Fork 289
Add output formatting tests #247
Copy link
Copy link
Closed
Labels
missing testA request to add a test to the suite that is currently not covered elsewhere.A request to add a test to the suite that is currently not covered elsewhere.
Milestone
Metadata
Metadata
Assignees
Labels
missing testA request to add a test to the suite that is currently not covered elsewhere.A request to add a test to the suite that is currently not covered elsewhere.
Type
Fields
Give feedbackNo fields configured for issues without a type.
In light of draft2019-09's output formatting, I think it might be prudent to have a set of tests that validate the output formatting.
Maybe this can be included in the draft2019-09 tests themselves (when they're added).
Something like:
Example test from draft-07's *properties.json*
{ "description": "object properties validation", "schema": { "properties": { "foo": {"type": "integer"}, "bar": {"type": "string"} } }, "tests": [ { ... }, { "description": "one property invalid is invalid", "data": {"foo": 1, "bar": {}}, "valid": false, "outputs": { "flag": { "valid": false }, "basic":{ "valid" : false, "errors" : [ { "valid" : false, "keywordLocation" : "#/properties", "instanceLocation" : "#" }, { "valid" : false, "keywordLocation" : "#/properties/foo/type", "instanceLocation" : "#/foo" }, { "valid" : false, "keywordLocation" : "#/properties/bar/type", "instanceLocation" : "#/bar" } ] }, "detailed": { "valid" : false, "keywordLocation" : "#/properties", "instanceLocation" : "#", "errors" : [ { "valid" : false, "keywordLocation" : "#/properties/foo/type", "instanceLocation" : "#/foo" }, { "valid" : false, "keywordLocation" : "#/properties/bar/type", "instanceLocation" : "#/bar" } ] }, "verbose": { "valid" : false, "keywordLocation" : "#", "instanceLocation" : "#", "errors" : [ { "valid" : false, "keywordLocation" : "#/properties", "instanceLocation" : "#", "errors" : [ { "valid" : false, "keywordLocation" : "#/properties/foo", "instanceLocation" : "#/foo", "errors" : [ { "valid" : false, "keywordLocation" : "#/properties/foo/type", "instanceLocation" : "#/foo" } ] }, { "valid" : false, "keywordLocation" : "#/properties/bar", "instanceLocation" : "#/bar", "errors" : [ { "valid" : false, "keywordLocation" : "#/properties/bar/type", "instanceLocation" : "#/bar" } ] } ] } ] } } }, { ... } ] }Doing this on all the tests, though, seems like overkill. I think a set of tests specifically for output would be more concise.