req.path.js
This file
Path
test/req.path.js
19 lines · 399 bytes · JavaScript
Last changed by
Not known.
History of this fileTake it
1234567891011121314151617181920
var express = require('../') , request = require('supertest');
describe('req', function(){ describe('.path', function(){ it('should return the parsed pathname', function(done){ var app = express();
app.use(function(req, res){ res.end(req.path); });
request(app) .get('/login?redirect=/post/1/comments') .expect('/login', done); }) })})