From 92d369e609d6ad760a79f67d1378639bb651c97b Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Fri, 8 Nov 2013 09:02:17 -0800 Subject: [PATCH] Add more assertions --- test/loopback-dl.test.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/loopback-dl.test.js b/test/loopback-dl.test.js index 7640b85c..9a3e8bc7 100644 --- a/test/loopback-dl.test.js +++ b/test/loopback-dl.test.js @@ -423,9 +423,16 @@ describe('Load models with base', function () { var ds = new ModelBuilder(); var User = ds.define('User', {name: String}); + + User.staticMethod = function staticMethod() {}; + User.prototype.instanceMethod = function instanceMethod() {}; + var Customer = ds.define('Customer', {vip: Boolean}, {base: 'User'}); assert(Customer.prototype instanceof User); + assert(Customer.staticMethod === User.staticMethod); + assert(Customer.prototype.instanceMethod === User.prototype.instanceMethod); + try { var Customer1 = ds.define('Customer1', {vip: Boolean}, {base: 'User1'});