req.path.js
This file
Path
test/req.path.js
20 lines · 412 bytes · JavaScript
Last changed by
tests: use strict modeDouglas Christopher Wilsonbefore adoptiona659137
History of this fileTake it
123456789101112131415161718192021'use strict'
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); }) })})