Skip to content
Myr

tests: add more tests

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

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent 9bf1247 · Browse files · 4 files+37 added−1 removed
This commit

State

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

Diff stats

4 files+37 added−1 removed

  • tests:+37 added−1 removed

4 files+37 added−1 removed

modified:test/app.router.js+5 added
23 unmodified lines
24 request(app)25 [method]('/foo')26 .expect('head' == method ? '' : method, done);27 })2829 it('should reject numbers for app.' + method, function(){30 var app = express();31 app[method].bind(app, '/', 3).should.throw(/Number/);32 })33 });34 })3536 describe('decode querystring', function(){
627 unmodified lines
modified:test/app.use.js+5 added
modified:test/exports.js+9 added-1 removed
modified:test/res.format.js+18 added
75 unmodified lines
76 describe('with extnames', function(){77 test(app2);78 })7980 describe('with parameters', function(){81 var app = express();8283 app.use(function(req, res, next){84 res.format({85 'text/plain; charset=utf-8': function(){ res.send('hey') },86 'text/html; foo=bar; bar=baz': function(){ res.send('<p>hey</p>') },87 'application/json; q=0.5': function(){ res.send({ message: 'hey' }) }88 });89 });9091 app.use(function(err, req, res, next){92 res.send(err.status, 'Supports: ' + err.types.join(', '));93 });9495 test(app);96 })9798 describe('given .default', function(){99 it('should be invoked instead of auto-responding', function(done){100 request(app3)101 .get('/')
97 unmodified lines