From f803ecec55205a9f147aba0ddfda5d1d0dbe6d38 Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Tue, 11 Nov 2014 11:27:39 -0800 Subject: [PATCH] Make sure loopback has all properties from express --- lib/loopback.js | 5 +++-- test/loopback.test.js | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/loopback.js b/lib/loopback.js index ef07bb88..ef82dae2 100644 --- a/lib/loopback.js +++ b/lib/loopback.js @@ -2,7 +2,8 @@ * Module dependencies. */ -var express = require('./server-app'); +var express = require('express'); +var loopbackExpress = require('./server-app'); var proto = require('./application'); var fs = require('fs'); var ejs = require('ejs'); @@ -52,7 +53,7 @@ loopback.mime = express.mime; */ function createApplication() { - var app = express(); + var app = loopbackExpress(); merge(app, proto); diff --git a/test/loopback.test.js b/test/loopback.test.js index 7dd63702..1bd996ed 100644 --- a/test/loopback.test.js +++ b/test/loopback.test.js @@ -359,6 +359,13 @@ describe('loopback', function() { }); describe('loopback object', function() { + it('inherits properties from express', function() { + var express = require('express'); + for (var i in express) { + expect(loopback).to.have.property(i, express[i]); + } + }); + it('exports all built-in models', function() { var expectedModelNames = [ 'Email',