@@ -239,29 +239,19 @@ describe('Client', () => {
239
239
assert . equal ( await client . sendCommand ( [ 'PING' ] ) , 'PONG' ) ;
240
240
} , GLOBAL . SERVERS . OPEN ) ;
241
241
242
- describe ( 'AbortController' , ( ) => {
243
- before ( function ( ) {
244
- if ( ! global . AbortController ) {
245
- this . skip ( ) ;
246
- }
242
+ testUtils . testWithClient ( 'Unactivated AbortController should not abort' , async client => {
243
+ await client . sendCommand ( [ 'PING' ] , {
244
+ abortSignal : new AbortController ( ) . signal
247
245
} ) ;
246
+ } , GLOBAL . SERVERS . OPEN ) ;
248
247
249
- testUtils . testWithClient ( 'success' , async client => {
250
- await client . sendCommand ( [ 'PING' ] , {
251
- abortSignal : new AbortController ( ) . signal
252
- } ) ;
253
- } , GLOBAL . SERVERS . OPEN ) ;
254
-
255
- testUtils . testWithClient ( 'AbortError' , async client => {
256
- await blockSetImmediate ( async ( ) => {
257
- await assert . rejects ( client . sendCommand ( [ 'PING' ] , {
258
- abortSignal : AbortSignal . timeout ( 5 )
259
- } ) , AbortError ) ;
260
- } )
261
- } , GLOBAL . SERVERS . OPEN ) ;
262
-
263
- } ) ;
264
-
248
+ testUtils . testWithClient ( 'AbortError' , async client => {
249
+ await blockSetImmediate ( async ( ) => {
250
+ await assert . rejects ( client . sendCommand ( [ 'PING' ] , {
251
+ abortSignal : AbortSignal . timeout ( 5 )
252
+ } ) , AbortError ) ;
253
+ } )
254
+ } , GLOBAL . SERVERS . OPEN ) ;
265
255
266
256
testUtils . testWithClient ( 'Timeout with custom timeout config' , async client => {
267
257
await blockSetImmediate ( async ( ) => {
0 commit comments