Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion test/res.redirect.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,20 @@
.end(done)
})
})
})

// Wisp-xd: Added this test case to reproduce Issue #6941
describe('when redirecting to undefined', function () {
it('should error when redirecting to undefined', function (done) {
var app = express();

Check failure on line 219 in test/res.redirect.js

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces not allowed
app.use(function (req, res) {
res.redirect(undefined);
});

Check failure on line 223 in test/res.redirect.js

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces not allowed
request(app)
.get('/')
.expect(500, done);

Check failure on line 226 in test/res.redirect.js

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces not allowed
});
});

})

Check failure on line 230 in test/res.redirect.js

View workflow job for this annotation

GitHub Actions / Lint

Newline required at end of file but not found
Loading