fix Application.inspect() – missing .proxy value.
This commit is contained in:
parent
2907b7fc03
commit
7fe29d92f1
2 changed files with 4 additions and 0 deletions
|
@ -46,6 +46,7 @@ function Application() {
|
|||
this.env = process.env.NODE_ENV || 'development';
|
||||
this.subdomainOffset = 2;
|
||||
this.middleware = [];
|
||||
this.proxy = false;
|
||||
this.context = Object.create(context);
|
||||
this.request = Object.create(request);
|
||||
this.response = Object.create(response);
|
||||
|
@ -85,6 +86,7 @@ app.inspect =
|
|||
app.toJSON = function(){
|
||||
return only(this, [
|
||||
'subdomainOffset',
|
||||
'proxy',
|
||||
'env'
|
||||
]);
|
||||
};
|
||||
|
|
|
@ -67,6 +67,7 @@ describe('app.toJSON()', function(){
|
|||
|
||||
obj.should.eql({
|
||||
subdomainOffset: 2,
|
||||
proxy: false,
|
||||
env: 'test'
|
||||
});
|
||||
})
|
||||
|
@ -77,6 +78,7 @@ describe('app.inspect()', function(){
|
|||
var app = koa();
|
||||
var util = require('util');
|
||||
var str = util.inspect(app);
|
||||
assert.equal("{ subdomainOffset: 2, proxy: false, env: 'test' }", str);
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue