Lines Matching refs:model
6 * Test whether given model is valid.
7 * @param {Object} model
10 var modelIsValid = function(model) {
12 if (!('name' in model) || !('id' in model))
16 if ('children' in model && 'size' in model ||
17 !('children' in model) && !('size' in model))
21 if ('subs' in model && !('template' in model) ||
22 !('subs' in model) && 'template' in model)
25 // If model contains children, every child also must be valid.
26 if ('children' in model) {
27 return model.children.reduce(function(previous, current) {
43 models.forEach(function(model) {
44 ok(modelIsValid(model));