strongloop/loopback-datasource-juggler — pull request #71 by arlaneenalra (2014-02-06 03:54:30+00:00)
Title: Fix type testing

When running tests with version 1.17.1 of mocha, I get this error on
several tests:

Uncaught TypeError: Property 'a' of object # is not a
function

This fixes those errors.

Also related to this, I noticed that there are several cases where this error shows up:

AssertionError: expected { name: 'Joe',
age: 20,
customerId: 'c01',
bio: undefined,
approved: undefined,
joinedAt: undefined } not to have property 'bio'

I'm either completely mistaken or the way that registerProperty is implemented in ModelClass should make that test invalid. If the object has a field in its schema, that would seem to indicate that it has to have a matching property even if that property has no value ... Or did I miss something there.