File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,20 @@ Schemas can use any of these schemas as a meta-schema (that is the schema used i
115115Multiple meta-schemas can be passed, as in ` -s ` parameter.
116116
117117
118+ ## Test validation result
119+
120+ This command asserts that the result of the validation is as expected.
121+
122+ ``` sh
123+ ajv test -s test/schema.json -d test/valid_data.json --valid
124+ ajv test -s test/schema.json -d test/invalid_data.json --invalid
125+ ```
126+
127+ If the option ` --valid ` (` --invalid ` ) is used for the ` test ` to pass (exit code 0) the data file(s) should be valid (invalid).
128+
129+ This command supports the same options and parameters as [ validate] ( #validate-data ) with the exception of ` --changes ` .
130+
131+
118132## Ajv options
119133
120134You can pass the following Ajv options:
Original file line number Diff line number Diff line change 11{
22 "name" : " ajv-cli" ,
3- "version" : " 0.7 .0" ,
3+ "version" : " 0.8 .0" ,
44 "description" : " A command line interface for epoberezkin/ajv JSON schema validator" ,
55 "scripts" : {
66 "eslint" : " eslint index.js commands/*.js" ,
You can’t perform that action at this time.
0 commit comments