Skip to content
Myr

tests: add router.use validation tests

Before adoption: this commit came in with the history the project adopted, so no landing records it.

closes #2299

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent fbceae2 · Browse files · 1 file+12 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+12 added−0 removed

  • tests:+12 added−0 removed

1 file+12 added−0 removed

modified:test/Router.js+12 added
295 unmodified lines
296 done();297 })298 })299300 describe('.use', function() {301 it('should require arguments', function(){302 var router = new Router();303 router.use.bind(router).should.throw(/requires callback function/)304 })305306 it('should not accept non-functions', function(){307 var router = new Router();308 router.use.bind(router, '/', 'hello').should.throw(/requires callback function/)309 })310 })311312 describe('.param', function() {313 it('should call param function when routing VERBS', function(done) {314 var router = new Router();315
123 unmodified lines