Remove res.vary() (no arguments) signature#2943
Remove res.vary() (no arguments) signature#2943tunniclm wants to merge 1 commit intoexpressjs:5.0from
Conversation
|
The vary module already does this check and throw, no? |
|
It does throw if |
|
Happy to remove the check/throw or change it if it is still good to test if |
|
Yea, the idea behind the change is to remove any logic from Express itself, and just have it pass-through to the dependency. |
2dd248a to
f5bde96
Compare
|
OK, updates. I've removed the test that passes an empty array and kept the no args test. I think that's ok, but I'm happy to either remove the no args or add a test for empty array that checks it has no effect, if that fits better. |
Yea, let's keep the test, but update the expected outcome to what it is with the change. |
f5bde96 to
447d813
Compare
|
OK, done. |
447d813 to
bd2fc86
Compare
|
|
bd2fc86 to
0f34edb
Compare
|
@tunniclm coverage has decreased by a fraction, otherwise looks good to me. |
|
As mentioned in the other similar pull request (see #2939 (comment)), the slight reduction in coverage is due to the reduced number of lines in the changed file (response.js). |
test/res.vary.js
Outdated
There was a problem hiding this comment.
Can you add this as an additional test rather than altering the existing test? I think both the former test and the test you changed it to have merit and would like to have both.
|
Hi @tunniclm, can you address the comment regarding the test and possibly rebase this pull request? Then I think everything is resolved to merge after that. |
0f34edb to
56e6bba
Compare
|
Updated. |
|
Merged into the 5.0 branch. |
Changed
res.vary()to throwTypeErrorif nofieldargument is passed or if the value offieldargument is an empty array. (Similar to howres.sendFile()deals with a missingpathargument).