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

closes #550

Fix lint

Use arrow function

Remove not necessary import
This commit is contained in:
broucz 2015-10-25 08:54:57 +01:00 committed by Jonathan Ong
parent db7da4eb4f
commit e859c602d1

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