Last active
July 27, 2017 18:07
-
-
Save loopDelicious/e129f24f340a5d0a327c4716ab585456 to your computer and use it in GitHub Desktop.
jsonValidation
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
// Load the JSON Schema | |
const customerSchema = JSON.parse(environment.customerSchema); | |
// Test whether the response matches the schema | |
var customer = JSON.parse(responseBody); | |
tests["Customer is valid"] = tv4.validate(customer, customerSchema); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment