@@ -37,7 +37,7 @@ describe("client authentication", function () {
3737 it ( "allows auth to be provided with 'auth' method" , function ( done ) {
3838 if ( helper . redisProcess ( ) . spawnFailed ( ) ) this . skip ( ) ;
3939
40- client = redis . createClient . apply ( redis . createClient , args ) ;
40+ client = redis . createClient . apply ( null , args ) ;
4141 client . auth ( auth , function ( err , res ) {
4242 assert . strictEqual ( null , err ) ;
4343 assert . strictEqual ( "OK" , res . toString ( ) ) ;
@@ -48,7 +48,7 @@ describe("client authentication", function () {
4848 it ( "emits error when auth is bad without callback" , function ( done ) {
4949 if ( helper . redisProcess ( ) . spawnFailed ( ) ) this . skip ( ) ;
5050
51- client = redis . createClient . apply ( redis . createClient , args ) ;
51+ client = redis . createClient . apply ( null , args ) ;
5252
5353 client . once ( 'error' , function ( err ) {
5454 assert . strictEqual ( err . command , 'AUTH' ) ;
@@ -62,7 +62,7 @@ describe("client authentication", function () {
6262 it ( "returns an error when auth is bad (empty string) with a callback" , function ( done ) {
6363 if ( helper . redisProcess ( ) . spawnFailed ( ) ) this . skip ( ) ;
6464
65- client = redis . createClient . apply ( redis . createClient , args ) ;
65+ client = redis . createClient . apply ( null , args ) ;
6666
6767 client . auth ( '' , function ( err , res ) {
6868 assert . strictEqual ( err . command , 'AUTH' ) ;
@@ -114,7 +114,7 @@ describe("client authentication", function () {
114114 var args = config . configureClient ( parser , ip , {
115115 auth_pass : auth
116116 } ) ;
117- client = redis . createClient . apply ( redis . createClient , args ) ;
117+ client = redis . createClient . apply ( null , args ) ;
118118 client . on ( "ready" , function ( ) {
119119 return done ( ) ;
120120 } ) ;
@@ -127,7 +127,7 @@ describe("client authentication", function () {
127127 password : auth ,
128128 no_ready_check : true
129129 } ) ;
130- client = redis . createClient . apply ( redis . createClient , args ) ;
130+ client = redis . createClient . apply ( null , args ) ;
131131 client . on ( "ready" , function ( ) {
132132 done ( ) ;
133133 } ) ;
@@ -137,7 +137,7 @@ describe("client authentication", function () {
137137 if ( helper . redisProcess ( ) . spawnFailed ( ) ) this . skip ( ) ;
138138
139139 var args = config . configureClient ( parser , ip ) ;
140- client = redis . createClient . apply ( redis . createClient , args ) ;
140+ client = redis . createClient . apply ( null , args ) ;
141141 client . auth ( auth ) ;
142142 client . on ( "ready" , function ( ) {
143143 return done ( ) ;
@@ -148,7 +148,7 @@ describe("client authentication", function () {
148148 if ( helper . redisProcess ( ) . spawnFailed ( ) ) this . skip ( ) ;
149149
150150 var readyCount = 0 ;
151- client = redis . createClient . apply ( redis . createClient , args ) ;
151+ client = redis . createClient . apply ( null , args ) ;
152152 client . auth ( auth ) ;
153153 client . on ( "ready" , function ( ) {
154154 readyCount ++ ;
@@ -163,7 +163,7 @@ describe("client authentication", function () {
163163 it ( 'should return an error if the password is not of type string and a callback has been provided' , function ( done ) {
164164 if ( helper . redisProcess ( ) . spawnFailed ( ) ) this . skip ( ) ;
165165
166- client = redis . createClient . apply ( redis . createClient , args ) ;
166+ client = redis . createClient . apply ( null , args ) ;
167167 var async = true ;
168168 client . auth ( undefined , function ( err , res ) {
169169 assert . strictEqual ( err . message , 'ERR invalid password' ) ;
@@ -178,7 +178,7 @@ describe("client authentication", function () {
178178 it ( 'should emit an error if the password is not of type string and no callback has been provided' , function ( done ) {
179179 if ( helper . redisProcess ( ) . spawnFailed ( ) ) this . skip ( ) ;
180180
181- client = redis . createClient . apply ( redis . createClient , args ) ;
181+ client = redis . createClient . apply ( null , args ) ;
182182 client . on ( 'error' , function ( err ) {
183183 assert . strictEqual ( err . message , 'ERR invalid password' ) ;
184184 assert . strictEqual ( err . command , 'AUTH' ) ;
@@ -193,7 +193,7 @@ describe("client authentication", function () {
193193 var args = config . configureClient ( parser , ip , {
194194 auth_pass : auth
195195 } ) ;
196- client = redis . createClient . apply ( redis . createClient , args ) ;
196+ client = redis . createClient . apply ( null , args ) ;
197197 client . on ( "ready" , function ( ) {
198198 client . auth ( auth , helper . isString ( 'OK' , done ) ) ;
199199 } ) ;
@@ -205,7 +205,7 @@ describe("client authentication", function () {
205205 var args = config . configureClient ( parser , ip , {
206206 no_ready_check : true
207207 } ) ;
208- client = redis . createClient . apply ( redis . createClient , args ) ;
208+ client = redis . createClient . apply ( null , args ) ;
209209 client . on ( "ready" , function ( ) {
210210 client . set ( 'foo' , 'bar' , function ( err , res ) {
211211 assert . equal ( err . message , 'NOAUTH Authentication required.' ) ;
@@ -218,7 +218,7 @@ describe("client authentication", function () {
218218
219219 it ( 'does not allow auth to be provided post-hoc with auth method if not authenticated before' , function ( done ) {
220220 if ( helper . redisProcess ( ) . spawnFailed ( ) ) this . skip ( ) ;
221- client = redis . createClient . apply ( redis . createClient , args ) ;
221+ client = redis . createClient . apply ( null , args ) ;
222222 client . on ( "error" , function ( err ) {
223223 assert . equal ( err . code , 'NOAUTH' ) ;
224224 assert . equal ( err . message , 'Ready check failed: NOAUTH Authentication required.' ) ;
0 commit comments