We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b6e700 commit 7676c4cCopy full SHA for 7676c4c
test/res.location.js
@@ -42,5 +42,32 @@ describe('res', function(){
42
.expect('Location', 'https://google.com?q=%A710')
43
.expect(200, done)
44
})
45
+
46
+ it('should set the header to "/" on back', function (done) {
47
+ var app = express()
48
49
+ app.use(function (req, res) {
50
+ res.location('back').end()
51
+ })
52
53
+ request(app)
54
+ .get('/')
55
+ .expect('Location', '/')
56
+ .expect(200, done)
57
58
59
+ it('should set the header to "next" on back', function (done) {
60
61
62
63
64
65
66
67
68
+ .set('Referrer', '/next')
69
+ .expect('Location', '/next')
70
71
72
73
0 commit comments