Last active
March 30, 2019 19:10
-
-
Save moshfeu/e3adf5e631a08c774a82f17dfb518863 to your computer and use it in GitHub Desktop.
AJV + Jest - gits #1
This file contains hidden or 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
var Ajv = require('ajv'); | |
var ajv = new Ajv(); | |
var validate = ajv.compile(schema); | |
var valid = validate(data); | |
if (!valid) console.log(validate.errors); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment