@@ -77,12 +77,10 @@ function lazyllhttp () {
7777 if ( useWasmSIMD ) {
7878 try {
7979 mod = new WebAssembly . Module ( require ( '../llhttp/llhttp_simd-wasm.js' ) )
80- /* istanbul ignore next */
8180 } catch {
8281 }
8382 }
8483
85- /* istanbul ignore next */
8684 if ( ! mod ) {
8785 // We could check if the error was caused by the simd option not
8886 // being enabled, but the occurring of this other error
@@ -100,7 +98,6 @@ function lazyllhttp () {
10098 * @returns {number }
10199 */
102100 wasm_on_url : ( p , at , len ) => {
103- /* istanbul ignore next */
104101 return 0
105102 } ,
106103 /**
@@ -265,7 +262,6 @@ class Parser {
265262
266263 this . timeoutValue = delay
267264 } else if ( this . timeout ) {
268- // istanbul ignore else: only for jest
269265 if ( this . timeout . refresh ) {
270266 this . timeout . refresh ( )
271267 }
@@ -286,7 +282,6 @@ class Parser {
286282
287283 assert ( this . timeoutType === TIMEOUT_BODY )
288284 if ( this . timeout ) {
289- // istanbul ignore else: only for jest
290285 if ( this . timeout . refresh ) {
291286 this . timeout . refresh ( )
292287 }
@@ -356,7 +351,6 @@ class Parser {
356351 } else {
357352 const ptr = llhttp . llhttp_get_error_reason ( this . ptr )
358353 let message = ''
359- /* istanbul ignore else: difficult to make a test case for */
360354 if ( ptr ) {
361355 const len = new Uint8Array ( llhttp . memory . buffer , ptr ) . indexOf ( 0 )
362356 message =
@@ -402,7 +396,6 @@ class Parser {
402396 onMessageBegin ( ) {
403397 const { socket, client } = this
404398
405- /* istanbul ignore next: difficult to make a test case for */
406399 if ( socket . destroyed ) {
407400 return - 1
408401 }
@@ -531,14 +524,12 @@ class Parser {
531524 onHeadersComplete ( statusCode , upgrade , shouldKeepAlive ) {
532525 const { client, socket, headers, statusText } = this
533526
534- /* istanbul ignore next: difficult to make a test case for */
535527 if ( socket . destroyed ) {
536528 return - 1
537529 }
538530
539531 const request = client [ kQueue ] [ client [ kRunningIdx ] ]
540532
541- /* istanbul ignore next: difficult to make a test case for */
542533 if ( ! request ) {
543534 return - 1
544535 }
@@ -572,7 +563,6 @@ class Parser {
572563 : client [ kBodyTimeout ]
573564 this . setTimeout ( bodyTimeout , TIMEOUT_BODY )
574565 } else if ( this . timeout ) {
575- // istanbul ignore else: only for jest
576566 if ( this . timeout . refresh ) {
577567 this . timeout . refresh ( )
578568 }
@@ -653,7 +643,6 @@ class Parser {
653643
654644 assert ( this . timeoutType === TIMEOUT_BODY )
655645 if ( this . timeout ) {
656- // istanbul ignore else: only for jest
657646 if ( this . timeout . refresh ) {
658647 this . timeout . refresh ( )
659648 }
@@ -709,7 +698,6 @@ class Parser {
709698 return 0
710699 }
711700
712- /* istanbul ignore next: should be handled by llhttp? */
713701 if ( request . method !== 'HEAD' && contentLength && bytesRead !== parseInt ( contentLength , 10 ) ) {
714702 util . destroy ( socket , new ResponseContentLengthMismatchError ( ) )
715703 return - 1
@@ -750,7 +738,6 @@ class Parser {
750738function onParserTimeout ( parser ) {
751739 const { socket, timeoutType, client, paused } = parser . deref ( )
752740
753- /* istanbul ignore else */
754741 if ( timeoutType === TIMEOUT_HEADERS ) {
755742 if ( ! socket [ kWriting ] || socket . writableNeedDrain || client [ kRunning ] > 1 ) {
756743 assert ( ! paused , 'cannot be paused while waiting for headers' )
@@ -1157,7 +1144,6 @@ function writeH1 (client, request) {
11571144 channels . sendHeaders . publish ( { request, headers : header , socket } )
11581145 }
11591146
1160- /* istanbul ignore else: assertion */
11611147 if ( ! body || bodyLength === 0 ) {
11621148 writeBuffer ( abort , null , client , request , socket , contentLength , header , expectsPayload )
11631149 } else if ( util . isBuffer ( body ) ) {
@@ -1538,7 +1524,6 @@ class AsyncWriter {
15381524
15391525 if ( ! ret ) {
15401526 if ( socket [ kParser ] . timeout && socket [ kParser ] . timeoutType === TIMEOUT_HEADERS ) {
1541- // istanbul ignore else: only for jest
15421527 if ( socket [ kParser ] . timeout . refresh ) {
15431528 socket [ kParser ] . timeout . refresh ( )
15441529 }
@@ -1589,7 +1574,6 @@ class AsyncWriter {
15891574 }
15901575
15911576 if ( socket [ kParser ] . timeout && socket [ kParser ] . timeoutType === TIMEOUT_HEADERS ) {
1592- // istanbul ignore else: only for jest
15931577 if ( socket [ kParser ] . timeout . refresh ) {
15941578 socket [ kParser ] . timeout . refresh ( )
15951579 }
0 commit comments