@@ -10,7 +10,6 @@ import {
1010 openRawTlsSocket ,
1111 http2ProxyRequest ,
1212 nodeSatisfies ,
13- SOCKET_RESET_SUPPORTED ,
1413 BROKEN_H1_OVER_H2_TUNNELLING
1514} from "../../test-utils" ;
1615
@@ -33,14 +32,12 @@ describe("Broken response handlers", function () {
3332 } ) ;
3433
3534 it ( "should allow forcibly resetting the connection" , async function ( ) {
36- if ( ! nodeSatisfies ( SOCKET_RESET_SUPPORTED ) ) this . skip ( ) ;
37-
3835 await server . forGet ( '/mocked-endpoint' ) . thenResetConnection ( ) ;
3936
4037 let result = await fetch ( server . urlFor ( '/mocked-endpoint' ) ) . catch ( e => e ) ;
4138
4239 expect ( result ) . to . be . instanceof ( Error ) ;
43- expect ( result . message ) . to . contain ( 'read ECONNRESET' ) ;
40+ expect ( result . message ) . to . contain ( isNode ? 'read ECONNRESET' : 'Failed to fetch ') ;
4441 } ) ;
4542
4643
@@ -71,8 +68,6 @@ describe("Broken response handlers", function () {
7168
7269 nodeOnly ( ( ) => {
7370 it ( "should allow forcibly closing proxied connections" , async function ( ) {
74- if ( ! nodeSatisfies ( SOCKET_RESET_SUPPORTED ) ) this . skip ( ) ;
75-
7671 await server . forGet ( 'example.com' ) . thenResetConnection ( ) ;
7772
7873 const tunnel = await openRawTlsSocket ( server ) ;
@@ -93,8 +88,6 @@ describe("Broken response handlers", function () {
9388 } ) ;
9489
9590 it ( "should allow forcibly closing h2-over-h2 proxy connections" , async function ( ) {
96- if ( ! nodeSatisfies ( SOCKET_RESET_SUPPORTED ) ) this . skip ( ) ;
97-
9891 await server . forGet ( 'example.com' ) . thenResetConnection ( ) ;
9992
10093 const response : any = await http2ProxyRequest ( server , `https://example.com` )
@@ -107,7 +100,6 @@ describe("Broken response handlers", function () {
107100 } ) ;
108101
109102 it ( "should allow forcibly closing h1.1-over-h2 proxy connections" , async function ( ) {
110- if ( ! nodeSatisfies ( SOCKET_RESET_SUPPORTED ) ) this . skip ( ) ;
111103 if ( nodeSatisfies ( BROKEN_H1_OVER_H2_TUNNELLING ) ) this . skip ( ) ;
112104
113105 await server . forGet ( 'example.com' ) . thenResetConnection ( ) ;
0 commit comments