You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -852,5 +856,34 @@ describe('revalidator', function () {
852
856
message: 'is not defined in schema'
853
857
});
854
858
});
859
+
860
+
it('should validate properties when schema itself has properties which are not of type object',function(){
861
+
schema={
862
+
properties: {
863
+
a: undefined,
864
+
b: {type: 'string'}
865
+
}
866
+
};
867
+
data={a: 'a',b: 'b',c: 'c'};
868
+
varres=val.validate(data,schema,{});
869
+
870
+
expect(res.valid).toBeTruthy();
871
+
expect(Object.keys(data).length).toBe(3);
872
+
});
873
+
874
+
it('should validate properties when schema itself has properties which are not of type object and remove properties which have schema with invalid properties',function(){
0 commit comments