This commit is contained in:
TJ Holowaychuk 2013-08-18 11:16:02 -07:00
parent 607f2fda8f
commit d9e8bb711e

View file

@ -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
});