Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
topic: function () {
return models.FieldKinds;
},
'string accepts anything': function(kinds) {
'the declared field specs are available too': function(Person) {
should.equal(
Person._meta.field.definitions.username,
models.FieldKinds.alphanumeric
);
should.equal(
Person._meta.field.definitions.email_address,
models.FieldKinds.email
);
should.equal(
Person._meta.field.definitions.zipcode,
models.FieldKinds.numeric
);
},
'can be created from a JSON string': function(Person) {
topic: function(){
this.callback(null, models.FieldKinds.hashOf(["name", "id"]));
},
'get the values from a given object for the given keys': function(hasher) {
'the declared field specs are available too': function(Person) {
should.equal(
Person._meta.field.definitions.username,
models.FieldKinds.alphanumeric
);
should.equal(
Person._meta.field.definitions.email_address,
models.FieldKinds.email
);
should.equal(
Person._meta.field.definitions.zipcode,
models.FieldKinds.numeric
);
},
'can be created from a JSON string': function(Person) {