From e791e9006c57bf7b48f35f2cc086a49c9ecabccf Mon Sep 17 00:00:00 2001 From: ssh24 Date: Fri, 26 May 2017 18:49:02 -0400 Subject: [PATCH] Apply iteration on the model object --- test/model-inheritance.test.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/model-inheritance.test.js b/test/model-inheritance.test.js index 185384ce..95931a30 100644 --- a/test/model-inheritance.test.js +++ b/test/model-inheritance.test.js @@ -180,13 +180,11 @@ describe('Model class inheritance', function() { return k.indexOf('__') === -1; }).length, 0); var count = 0; - for (var p in customer) { + for (var p in customer.toObject()) { if (p.indexOf('__') === 0) { continue; } - // 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') { + if (typeof customer[p] !== 'function') { count++; } }