Skip to content

Instantly share code, notes, and snippets.

@moshfeu
Created March 30, 2019 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moshfeu/cf526dfd293698048d34a39b46489f05 to your computer and use it in GitHub Desktop.
Save moshfeu/cf526dfd293698048d34a39b46489f05 to your computer and use it in GitHub Desktop.
AJV + Jest - gits #3
import users from './users.json';
const shema = {
"type": "array",
"items": {
"type": "object",
"properties": {
"fullname": {
"type": "string",
"minLength": 2
},
},
},
};
ajv.validate(shema, users);
[
{
"fullname": "john doe"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment