Merge pull request #1384 from strongloop/fix/model-inheritance-test
Fix count of properties
This commit is contained in:
commit
0abfceebaa
|
@ -184,11 +184,13 @@ describe('Model class inheritance', function() {
|
|||
if (p.indexOf('__') === 0) {
|
||||
continue;
|
||||
}
|
||||
if (typeof customer[p] !== 'function') {
|
||||
// Please note there is an injected id from User prototype which is a function
|
||||
// On node >= 7, this property does not show up
|
||||
if (typeof customer[p] !== 'function' && p !== 'id') {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
assert.equal(count, 7); // Please note there is an injected id from User prototype
|
||||
assert.equal(count, 6);
|
||||
assert.equal(Object.keys(customer.toObject()).filter(function(k) {
|
||||
// Remove internal properties
|
||||
return k.indexOf('__') === -1;
|
||||
|
|
Loading…
Reference in New Issue