Skip to content

Commit

Permalink
c8 ignores for node-version-specific code and fix c8 ignore in Header…
Browse files Browse the repository at this point in the history
…s constructor
  • Loading branch information
tekwiz committed Feb 28, 2021
1 parent 09df486 commit 52f864b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/headers.js
Expand Up @@ -7,6 +7,7 @@
import {types} from 'util';
import http from 'http';

/* c8 ignore next 9 */
const validateHeaderName = typeof http.validateHeaderName === 'function' ?
http.validateHeaderName :
name => {
Expand All @@ -17,6 +18,7 @@ const validateHeaderName = typeof http.validateHeaderName === 'function' ?
}
};

/* c8 ignore next 9 */
const validateHeaderValue = typeof http.validateHeaderValue === 'function' ?
http.validateHeaderValue :
(name, value) => {
Expand Down Expand Up @@ -141,8 +143,8 @@ export default class Headers extends URLSearchParams {
return Reflect.get(target, p, receiver);
}
}
/* c8 ignore next */
});
/* c8 ignore next */
}

get [Symbol.toStringTag]() {
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Expand Up @@ -201,6 +201,7 @@ export default async function fetch(url, options_) {

let body = pump(response_, new PassThrough(), reject);
// see https://github.com/nodejs/node/pull/29376
/* c8 ignore next 3 */
if (process.version < 'v12.10') {
response_.on('aborted', abortAndFinalize);
}
Expand Down

0 comments on commit 52f864b

Please sign in to comment.