@@ -43,7 +43,7 @@ const instrumentation = registerInstrumentationTesting(
4343 new RedisInstrumentation ( )
4444) ;
4545
46- import * as redisTypes from 'redis ' ;
46+ import type { Callback } from '../../src/v2-v3/internal-types ' ;
4747import { RedisResponseCustomAttributeFunction } from '../../src/types' ;
4848
4949const CONFIG = {
@@ -65,7 +65,7 @@ const unsetStatus: SpanStatus = {
6565} ;
6666
6767describe ( 'redis v2-v3' , ( ) => {
68- let redis : typeof redisTypes ;
68+ let redis : any ;
6969 const shouldTestLocal = process . env . RUN_REDIS_TESTS_LOCAL ;
7070 const shouldTest = process . env . RUN_REDIS_TESTS || shouldTestLocal ;
7171 const tracer = trace . getTracer ( 'external' ) ;
@@ -95,7 +95,7 @@ describe('redis v2-v3', () => {
9595 describe ( '#createClient()' , ( ) => {
9696 it ( 'should propagate the current span to event handlers' , done => {
9797 const span = tracer . startSpan ( 'test span' ) ;
98- let client : redisTypes . RedisClient ;
98+ let client : any ;
9999 const readyHandler = ( ) => {
100100 assert . strictEqual ( trace . getSpan ( context . active ( ) ) , span ) ;
101101 client . quit ( done ) ;
@@ -114,43 +114,42 @@ describe('redis v2-v3', () => {
114114 } ) ;
115115
116116 describe ( '#send_internal_message()' , ( ) => {
117- let client : redisTypes . RedisClient ;
117+ let client : any ;
118118
119119 const REDIS_OPERATIONS : Array < {
120120 description : string ;
121121 command : string ;
122122 args : string [ ] ;
123123 expectedDbStatement : string ;
124- method : ( cb : redisTypes . Callback < unknown > ) => unknown ;
124+ method : ( cb : Callback < unknown > ) => unknown ;
125125 } > = [
126126 {
127127 description : 'insert' ,
128128 command : 'hset' ,
129129 args : [ 'hash' , 'random' , 'random' ] ,
130130 expectedDbStatement : 'hash random [1 other arguments]' ,
131- method : ( cb : redisTypes . Callback < number > ) =>
131+ method : ( cb : Callback < number > ) =>
132132 client . hset ( 'hash' , 'random' , 'random' , cb ) ,
133133 } ,
134134 {
135135 description : 'get' ,
136136 command : 'get' ,
137137 args : [ 'test' ] ,
138138 expectedDbStatement : 'test' ,
139- method : ( cb : redisTypes . Callback < string | null > ) =>
140- client . get ( 'test' , cb ) ,
139+ method : ( cb : Callback < string | null > ) => client . get ( 'test' , cb ) ,
141140 } ,
142141 {
143142 description : 'delete' ,
144143 command : 'del' ,
145144 args : [ 'test' ] ,
146145 expectedDbStatement : 'test' ,
147- method : ( cb : redisTypes . Callback < number > ) => client . del ( 'test' , cb ) ,
146+ method : ( cb : Callback < number > ) => client . del ( 'test' , cb ) ,
148147 } ,
149148 ] ;
150149
151150 before ( done => {
152151 client = redis . createClient ( URL ) ;
153- client . on ( 'error' , err => {
152+ client . on ( 'error' , ( err : any ) => {
154153 done ( err ) ;
155154 } ) ;
156155 client . on ( 'ready' , done ) ;
0 commit comments