Update test: application -> use() should throw if not a function

closes #550

Fix lint

Use arrow function

Remove not necessary import
master
broucz 2015-10-25 08:54:57 +01:00 committed by Jonathan Ong
parent db7da4eb4f
commit e859c602d1
1 changed files with 7 additions and 0 deletions

View File

@ -52,4 +52,11 @@ describe('app.use(fn)', function(){
.expect(404)
.end(done);
});
it('should throw error for non function', function(done){
const app = new Koa();
(() => app.use('not a function')).should.throw('middleware must be a function!');
done();
});
});