Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix (coverage): remove statements not needed since fastify@3.22.1 #463

Merged
merged 4 commits into from
Jan 28, 2022
Merged
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ function fastifyNext (fastify, options, next) {
// set custom headers as next will finish the request
for (const [headerName, headerValue] of Object.entries(reply.getHeaders())) {
// Fastify sets content-length to `undefined` for error handlers, which is an invalid value
/* istanbul ignore next - this check is not needed since https://github.com/fastify/fastify/pull/3375 */
if (headerName === 'content-length' && headerValue === undefined) {
continue
}
Expand All @@ -110,6 +111,7 @@ function fastifyNext (fastify, options, next) {
// set custom headers as next will finish the request
for (const [headerName, headerValue] of Object.entries(reply.getHeaders())) {
// Fastify sets content-length to `undefined` for error handlers, which is an invalid value
/* istanbul ignore next - this check is not needed since https://github.com/fastify/fastify/pull/3375 */
if (headerName === 'content-length' && headerValue === undefined) {
continue
}
Expand Down