Expose loopback as `app.loopback`
The primary intention is to allow loopback plugins to determine the version of the loopback framework from the `app` object.
This commit is contained in:
parent
828aec9481
commit
c4db83ad43
|
@ -59,6 +59,8 @@ function createApplication() {
|
|||
|
||||
merge(app, proto);
|
||||
|
||||
app.loopback = loopback;
|
||||
|
||||
// Create a new instance of models registry per each app instance
|
||||
app.models = function() {
|
||||
return proto.models.apply(this, arguments);
|
||||
|
|
|
@ -585,4 +585,9 @@ describe('app', function() {
|
|||
expect(app.connectors.FOOBAR).to.equal(loopback.Memory);
|
||||
});
|
||||
});
|
||||
|
||||
it('exposes loopback as a property', function() {
|
||||
var app = loopback();
|
||||
expect(app.loopback).to.equal(loopback);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue