File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
- import * as sinon from "sinon" ;
2
1
import { expect } from "chai" ;
2
+ import * as sinon from "sinon" ;
3
3
import Redis from "../../lib/Redis" ;
4
4
import { RedisOptions } from "../../lib/redis/RedisOptions" ;
5
5
@@ -123,7 +123,10 @@ describe("Redis", () => {
123
123
124
124
describe ( ".createClient" , ( ) => {
125
125
it ( "should redirect to constructor" , ( ) => {
126
- const redis = Redis . createClient ( { name : "pass" , lazyConnect : true } ) ;
126
+ const redis = Redis . createClient ( {
127
+ name : "pass" ,
128
+ lazyConnect : true ,
129
+ } ) ;
127
130
expect ( redis . options ) . to . have . property ( "name" , "pass" ) ;
128
131
expect ( redis . options ) . to . have . property ( "lazyConnect" , true ) ;
129
132
} ) ;
@@ -198,9 +201,7 @@ describe("Redis", () => {
198
201
redis . on ( "error" , ( err ) => {
199
202
try {
200
203
expect ( err ) . to . be . instanceOf ( Error ) ;
201
- expect ( err . message ) . to . contain ( "ENOTFOUND" ) ;
202
- } catch ( assertionError ) {
203
- done ( assertionError ) ;
204
+ expect ( err . message ) . to . match ( / ( E N O T F O U N D | E A I _ A G A I N ) / ) ;
204
205
} finally {
205
206
redis . disconnect ( ) ;
206
207
done ( ) ;
You can’t perform that action at this time.
0 commit comments