Created
March 30, 2019 19:18
-
-
Save moshfeu/cf526dfd293698048d34a39b46489f05 to your computer and use it in GitHub Desktop.
AJV + Jest - gits #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import users from './users.json'; | |
const shema = { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"fullname": { | |
"type": "string", | |
"minLength": 2 | |
}, | |
}, | |
}, | |
}; | |
ajv.validate(shema, users); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"fullname": "john doe" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment