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" ;
21import { expect } from "chai" ;
2+ import * as sinon from "sinon" ;
33import Redis from "../../lib/Redis" ;
44import { RedisOptions } from "../../lib/redis/RedisOptions" ;
55
@@ -123,7 +123,10 @@ describe("Redis", () => {
123123
124124 describe ( ".createClient" , ( ) => {
125125 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+ } ) ;
127130 expect ( redis . options ) . to . have . property ( "name" , "pass" ) ;
128131 expect ( redis . options ) . to . have . property ( "lazyConnect" , true ) ;
129132 } ) ;
@@ -198,9 +201,7 @@ describe("Redis", () => {
198201 redis . on ( "error" , ( err ) => {
199202 try {
200203 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 ) / ) ;
204205 } finally {
205206 redis . disconnect ( ) ;
206207 done ( ) ;
You can’t perform that action at this time.
0 commit comments