misc
This commit is contained in:
parent
607f2fda8f
commit
d9e8bb711e
1 changed files with 6 additions and 1 deletions
|
@ -254,9 +254,10 @@ describe('app.respond', function(){
|
|||
})
|
||||
})
|
||||
|
||||
describe('app.context', function(){
|
||||
describe('app.context(obj)', function(){
|
||||
it('should merge regular object properties', function(done){
|
||||
var app = koa();
|
||||
|
||||
app.context({
|
||||
a: 1,
|
||||
b: 2
|
||||
|
@ -280,10 +281,12 @@ describe('app.context', function(){
|
|||
|
||||
it('should merge accessor properties', function(done){
|
||||
var app = koa();
|
||||
|
||||
app.context({
|
||||
get something() {
|
||||
return this._something || 'hi';
|
||||
},
|
||||
|
||||
set something(value) {
|
||||
this._something = value;
|
||||
}
|
||||
|
@ -308,9 +311,11 @@ describe('app.context', function(){
|
|||
|
||||
it('should merge multiple objects', function(done){
|
||||
var app = koa();
|
||||
|
||||
app.context({
|
||||
a: 1
|
||||
});
|
||||
|
||||
app.context({
|
||||
b: 2
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue