Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

more * tests

  • Loading branch information...
commit e9cd82b72d6d9ea9a145d9cfbd844550b0ace31c 1 parent 4d9ad21
TJ Holowaychuk tj authored
Showing with 17 additions and 1 deletion.
  1. +17 −1 test/app.router.js
18 test/app.router.js
View
@@ -314,7 +314,23 @@ describe('app.router', function(){
.get('/api/users/foo.bar.json')
.expect('users/foo.bar as json', done);
})
-
+
+ it('should work cross-segment', function(done){
+ var app = express();
+
+ app.get('/api*', function(req, res){
+ res.send(req.params[0]);
+ });
+
+ request(app)
+ .get('/api')
+ .expect('', function(){
+ request(app)
+ .get('/api/hey')
+ .expect('/hey', done);
+ });
+ })
+
it('should allow naming', function(done){
var app = express();
Please sign in to comment.
Something went wrong with that request. Please try again.