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:
parent
db7da4eb4f
commit
e859c602d1
1 changed files with 7 additions and 0 deletions
|
@ -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();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue