@@ -54,6 +54,7 @@ interface TestUtilsConfig {
54
54
interface CommonTestOptions {
55
55
serverArguments : Array < string > ;
56
56
minimumDockerVersion ?: Array < number > ;
57
+ skipTest ?: boolean ;
57
58
}
58
59
59
60
interface ClientTestOptions <
@@ -228,8 +229,7 @@ export default class TestUtils {
228
229
> (
229
230
title : string ,
230
231
fn : ( client : RedisClientType < M , F , S , RESP , TYPE_MAPPING > ) => unknown ,
231
- options : ClientTestOptions < M , F , S , RESP , TYPE_MAPPING > ,
232
- skipTest ?: boolean ,
232
+ options : ClientTestOptions < M , F , S , RESP , TYPE_MAPPING >
233
233
) : void {
234
234
let dockerPromise : ReturnType < typeof spawnRedisServer > ;
235
235
if ( this . isVersionGreaterThan ( options . minimumDockerVersion ) ) {
@@ -243,7 +243,7 @@ export default class TestUtils {
243
243
}
244
244
245
245
it ( title , async function ( ) {
246
- if ( skipTest ) return this . skip ( ) ;
246
+ if ( options . skipTest ) return this . skip ( ) ;
247
247
if ( ! dockerPromise ) return this . skip ( ) ;
248
248
249
249
const client = createClient ( {
@@ -284,12 +284,11 @@ export default class TestUtils {
284
284
range : ( [ minVersion : Array < number > , maxVersion : Array < number > ] | [ minVersion : Array < number > , 'LATEST' ] ) ,
285
285
title : string ,
286
286
fn : ( client : RedisClientType < M , F , S , RESP , TYPE_MAPPING > ) => unknown ,
287
- options : ClientTestOptions < M , F , S , RESP , TYPE_MAPPING > ,
288
- skipTest ?: boolean
287
+ options : ClientTestOptions < M , F , S , RESP , TYPE_MAPPING >
289
288
) : void {
290
289
291
290
if ( this . isVersionInRange ( range [ 0 ] , range [ 1 ] === 'LATEST' ? [ Infinity , Infinity , Infinity ] : range [ 1 ] ) ) {
292
- return this . testWithClient ( `${ title } [${ range [ 0 ] . join ( '.' ) } ] - [${ ( range [ 1 ] === 'LATEST' ) ? range [ 1 ] : range [ 1 ] . join ( "." ) } ] ` , fn , options , skipTest )
291
+ return this . testWithClient ( `${ title } [${ range [ 0 ] . join ( '.' ) } ] - [${ ( range [ 1 ] === 'LATEST' ) ? range [ 1 ] : range [ 1 ] . join ( "." ) } ] ` , fn , options )
293
292
} else {
294
293
console . warn ( `Skipping test ${ title } because server version ${ this . #VERSION_NUMBERS. join ( '.' ) } is not within range ${ range [ 0 ] . join ( "." ) } - ${ range [ 1 ] !== 'LATEST' ? range [ 1 ] . join ( "." ) : 'LATEST' } ` )
295
294
}
@@ -319,6 +318,7 @@ export default class TestUtils {
319
318
}
320
319
321
320
it ( title , async function ( ) {
321
+ if ( options . skipTest ) return this . skip ( ) ;
322
322
if ( ! dockerPromise ) return this . skip ( ) ;
323
323
324
324
const pool = createClientPool ( {
0 commit comments