express
express copied to clipboard
test: add failing test case for res.redirect(undefined) ref #6941
This PR adds a test case to reproduce the issue described in #6941.
When passing undefined to res.redirect():
- It prints a
express deprecatedwarning to the console. - But it still sends a 302 response with an invalid
Location: undefinedheader, instead of throwing an error.
This test expects a 500 error, so it currently FAILS, confirming the unexpected behavior.
Ref: #6941