Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
Exposes tv4's add schema method. Allows the registration of schemas used for schema validation.
@alias module:chakram.addSchema
@example
chakram.addSchema('http://example.com/schema', { ... });
*/
exports.addSchema = tv4.addSchema;
/**
Exposes tv4's get schemaMap method. Allows to check the mapping schema object.
@alias module:chakram.getSchemaMap
@example
chakram.getSchemaMap();
*/
exports.getSchemaMap = tv4.getSchemaMap;
/**
Exposes tv4's add format method. Allows add custom format for schema validation.
@alias module:chakram.addSchemaFormat
@example
chakram.addSchemaFormat('decimal-digits', function (data, schema) {
if (typeof data === 'string' && !/^[0-9]+$/.test(data)) {
return null;
}
return "must be string of decimal digits";
});
*/
exports.addSchemaFormat = tv4.addFormat;
var warnUser = function (message) {
if (this.currentTest.state !== 'failed') {