Comparing version 2.6.0 to 2.7.0
@@ -495,2 +495,9 @@ // Load modules | ||
internals.Any.prototype.validateCallback = function (object, options, callback) { // Not actually async, just callback interface | ||
var err = this.validate(object, options); | ||
return callback(err); | ||
}; | ||
internals.Any.prototype.describe = function () { | ||
@@ -497,0 +504,0 @@ |
{ | ||
"name": "joi", | ||
"description": "Object schema validation", | ||
"version": "2.6.0", | ||
"version": "2.7.0", | ||
"repository": "git://github.com/spumko/joi", | ||
@@ -6,0 +6,0 @@ "main": "index", |
@@ -244,2 +244,15 @@ // Load modules | ||
describe('#validateCallback', function () { | ||
it('validates using callback interface', function (done) { | ||
var schema = Joi.number(); | ||
schema.validateCallback(4, {}, function (err) { | ||
expect(err).to.not.exist; | ||
done(); | ||
}); | ||
}); | ||
}); | ||
describe('#description', function () { | ||
@@ -246,0 +259,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
338376
4408