change getMetaData function to be async and add tests

This commit is contained in:
umeshp7
2020-04-27 20:49:35 +05:30
parent babbddd331
commit 1e344ae7ba
3 changed files with 103 additions and 23 deletions

View File

@@ -18,13 +18,9 @@ module.exports = {
return schema.validationResult;
},
getMetaData: function (input) {
getMetaData: function (input, cb) {
var schema = new SchemaPack(input);
if (schema.metaData) {
return schema.metaData;
}
return schema.validationResult;
schema.getMetaData(cb);
},
mergeAndValidate: function (input, cb) {