File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -571,7 +571,9 @@ describe("ReconnectingWebSocket", () => {
571571 ) ;
572572
573573 sockets [ 0 ] . fireError ( new Error ( "ssl alert certificate_expired" ) ) ;
574- await vi . waitFor ( ( ) => expect ( ws . isDisconnected ) . toBe ( true ) ) ;
574+ await vi . waitFor ( ( ) =>
575+ expect ( ws . state ) . toBe ( ConnectionState . DISCONNECTED ) ,
576+ ) ;
575577
576578 expect ( sockets ) . toHaveLength ( 1 ) ;
577579 ws . close ( ) ;
@@ -588,7 +590,9 @@ describe("ReconnectingWebSocket", () => {
588590 await vi . waitFor ( ( ) => expect ( sockets ) . toHaveLength ( 2 ) ) ;
589591
590592 sockets [ 1 ] . fireError ( new Error ( "ssl alert certificate_expired" ) ) ;
591- await vi . waitFor ( ( ) => expect ( ws . isDisconnected ) . toBe ( true ) ) ;
593+ await vi . waitFor ( ( ) =>
594+ expect ( ws . state ) . toBe ( ConnectionState . DISCONNECTED ) ,
595+ ) ;
592596
593597 expect ( refreshCount ) . toBe ( 1 ) ;
594598 ws . close ( ) ;
@@ -615,7 +619,9 @@ describe("ReconnectingWebSocket", () => {
615619 ) ;
616620
617621 sockets [ 0 ] . fireError ( new Error ( "ssl alert unknown_ca" ) ) ;
618- await vi . waitFor ( ( ) => expect ( ws . isDisconnected ) . toBe ( true ) ) ;
622+ await vi . waitFor ( ( ) =>
623+ expect ( ws . state ) . toBe ( ConnectionState . DISCONNECTED ) ,
624+ ) ;
619625
620626 expect ( refreshCallback ) . not . toHaveBeenCalled ( ) ;
621627 ws . close ( ) ;
You can’t perform that action at this time.
0 commit comments