@@ -571,7 +571,7 @@ describe('Clerk singleton', () => {
571
571
const res = sut . navigate ( toUrl ) ;
572
572
expect ( res . then ) . toBeDefined ( ) ;
573
573
expect ( mockHref ) . not . toHaveBeenCalled ( ) ;
574
- expect ( mockNavigate ) . toHaveBeenCalledWith ( '/path#hash' ) ;
574
+ expect ( mockNavigate . mock . calls [ 0 ] [ 0 ] ) . toBe ( '/path#hash' ) ;
575
575
expect ( logSpy ) . not . toBeCalled ( ) ;
576
576
} ) ;
577
577
@@ -591,7 +591,7 @@ describe('Clerk singleton', () => {
591
591
const res = sut . navigate ( toUrl ) ;
592
592
expect ( res . then ) . toBeDefined ( ) ;
593
593
expect ( mockHref ) . not . toHaveBeenCalled ( ) ;
594
- expect ( mockNavigate ) . toHaveBeenCalledWith ( '/path#hash' ) ;
594
+ expect ( mockNavigate . mock . calls [ 0 ] [ 0 ] ) . toBe ( '/path#hash' ) ;
595
595
596
596
expect ( logSpy ) . toBeCalledTimes ( 1 ) ;
597
597
expect ( logSpy ) . toBeCalledWith ( `Clerk is navigating to: ${ toUrl } ` ) ;
@@ -721,7 +721,7 @@ describe('Clerk singleton', () => {
721
721
722
722
await waitFor ( ( ) => {
723
723
expect ( mockSignUpCreate ) . toHaveBeenCalledWith ( { transfer : true } ) ;
724
- expect ( mockNavigate ) . toHaveBeenCalledWith ( '/sign-up#/continue' ) ;
724
+ expect ( mockNavigate . mock . calls [ 0 ] [ 0 ] ) . toBe ( '/sign-up#/continue' ) ;
725
725
} ) ;
726
726
} ) ;
727
727
@@ -934,7 +934,7 @@ describe('Clerk singleton', () => {
934
934
await sut . handleRedirectCallback ( ) ;
935
935
936
936
await waitFor ( ( ) => {
937
- expect ( mockNavigate ) . toHaveBeenCalledWith ( '/sign-in#/factor-two' ) ;
937
+ expect ( mockNavigate . mock . calls [ 0 ] [ 0 ] ) . toBe ( '/sign-in#/factor-two' ) ;
938
938
} ) ;
939
939
} ) ;
940
940
@@ -977,7 +977,7 @@ describe('Clerk singleton', () => {
977
977
} ) ;
978
978
979
979
await waitFor ( ( ) => {
980
- expect ( mockNavigate ) . toHaveBeenCalledWith ( '/custom-2fa' ) ;
980
+ expect ( mockNavigate . mock . calls [ 0 ] [ 0 ] ) . toBe ( '/custom-2fa' ) ;
981
981
} ) ;
982
982
} ) ;
983
983
@@ -1032,7 +1032,7 @@ describe('Clerk singleton', () => {
1032
1032
} ) ;
1033
1033
1034
1034
await waitFor ( ( ) => {
1035
- expect ( mockNavigate ) . toHaveBeenCalledWith ( '/custom-sign-in' ) ;
1035
+ expect ( mockNavigate . mock . calls [ 0 ] [ 0 ] ) . toBe ( '/custom-sign-in' ) ;
1036
1036
} ) ;
1037
1037
} ) ;
1038
1038
@@ -1088,7 +1088,7 @@ describe('Clerk singleton', () => {
1088
1088
} as any ) ;
1089
1089
1090
1090
await waitFor ( ( ) => {
1091
- expect ( mockNavigate ) . toHaveBeenCalledWith ( '/custom-sign-in' ) ;
1091
+ expect ( mockNavigate . mock . calls [ 0 ] [ 0 ] ) . toBe ( '/custom-sign-in' ) ;
1092
1092
} ) ;
1093
1093
} ) ;
1094
1094
@@ -1136,7 +1136,7 @@ describe('Clerk singleton', () => {
1136
1136
await sut . handleRedirectCallback ( ) ;
1137
1137
1138
1138
await waitFor ( ( ) => {
1139
- expect ( mockNavigate ) . toHaveBeenCalledWith ( '/sign-up' ) ;
1139
+ expect ( mockNavigate . mock . calls [ 0 ] [ 0 ] ) . toBe ( '/sign-up' ) ;
1140
1140
} ) ;
1141
1141
} ) ;
1142
1142
@@ -1184,7 +1184,7 @@ describe('Clerk singleton', () => {
1184
1184
await sut . handleRedirectCallback ( ) ;
1185
1185
1186
1186
await waitFor ( ( ) => {
1187
- expect ( mockNavigate ) . toHaveBeenCalledWith ( '/sign-up' ) ;
1187
+ expect ( mockNavigate . mock . calls [ 0 ] [ 0 ] ) . toBe ( '/sign-up' ) ;
1188
1188
} ) ;
1189
1189
} ) ;
1190
1190
@@ -1226,7 +1226,7 @@ describe('Clerk singleton', () => {
1226
1226
await sut . handleRedirectCallback ( ) ;
1227
1227
1228
1228
await waitFor ( ( ) => {
1229
- expect ( mockNavigate ) . toHaveBeenCalledWith ( '/sign-up#/continue' ) ;
1229
+ expect ( mockNavigate . mock . calls [ 0 ] [ 0 ] ) . toBe ( '/sign-up#/continue' ) ;
1230
1230
} ) ;
1231
1231
} ) ;
1232
1232
@@ -1273,7 +1273,7 @@ describe('Clerk singleton', () => {
1273
1273
await sut . handleRedirectCallback ( ) ;
1274
1274
1275
1275
await waitFor ( ( ) => {
1276
- expect ( mockNavigate ) . toHaveBeenCalledWith ( '/sign-up#/verify-email-address' ) ;
1276
+ expect ( mockNavigate . mock . calls [ 0 ] [ 0 ] ) . toBe ( '/sign-up#/verify-email-address' ) ;
1277
1277
} ) ;
1278
1278
} ) ;
1279
1279
@@ -1305,7 +1305,7 @@ describe('Clerk singleton', () => {
1305
1305
await sut . handleRedirectCallback ( ) ;
1306
1306
1307
1307
await waitFor ( ( ) => {
1308
- expect ( mockNavigate ) . toHaveBeenCalledWith ( '/sign-in#/factor-one' ) ;
1308
+ expect ( mockNavigate . mock . calls [ 0 ] [ 0 ] ) . toBe ( '/sign-in#/factor-one' ) ;
1309
1309
} ) ;
1310
1310
} ) ;
1311
1311
@@ -1353,7 +1353,7 @@ describe('Clerk singleton', () => {
1353
1353
await sut . handleRedirectCallback ( ) ;
1354
1354
1355
1355
await waitFor ( ( ) => {
1356
- expect ( mockNavigate ) . toHaveBeenCalledWith ( '/sign-in#/factor-one' ) ;
1356
+ expect ( mockNavigate . mock . calls [ 0 ] [ 0 ] ) . toBe ( '/sign-in#/factor-one' ) ;
1357
1357
} ) ;
1358
1358
} ) ;
1359
1359
@@ -1412,7 +1412,7 @@ describe('Clerk singleton', () => {
1412
1412
await sut . handleRedirectCallback ( ) ;
1413
1413
1414
1414
await waitFor ( ( ) => {
1415
- expect ( mockNavigate ) . toHaveBeenCalledWith ( '/sign-up' ) ;
1415
+ expect ( mockNavigate . mock . calls [ 0 ] [ 0 ] ) . toBe ( '/sign-up' ) ;
1416
1416
} ) ;
1417
1417
} ) ;
1418
1418
@@ -1463,7 +1463,7 @@ describe('Clerk singleton', () => {
1463
1463
await sut . handleRedirectCallback ( ) ;
1464
1464
1465
1465
await waitFor ( ( ) => {
1466
- expect ( mockNavigate ) . toHaveBeenCalledWith ( '/sign-in' ) ;
1466
+ expect ( mockNavigate . mock . calls [ 0 ] [ 0 ] ) . toBe ( '/sign-in' ) ;
1467
1467
} ) ;
1468
1468
} ) ;
1469
1469
@@ -1501,7 +1501,7 @@ describe('Clerk singleton', () => {
1501
1501
await sut . handleRedirectCallback ( ) ;
1502
1502
1503
1503
await waitFor ( ( ) => {
1504
- expect ( mockNavigate ) . toHaveBeenCalledWith ( '/sign-in#/reset-password' ) ;
1504
+ expect ( mockNavigate . mock . calls [ 0 ] [ 0 ] ) . toBe ( '/sign-in#/reset-password' ) ;
1505
1505
} ) ;
1506
1506
} ) ;
1507
1507
} ) ;
@@ -1568,7 +1568,7 @@ describe('Clerk singleton', () => {
1568
1568
1569
1569
await waitFor ( ( ) => {
1570
1570
expect ( mockSetActive ) . not . toHaveBeenCalled ( ) ;
1571
- expect ( mockNavigate ) . toHaveBeenCalledWith ( redirectUrl ) ;
1571
+ expect ( mockNavigate . mock . calls [ 0 ] [ 0 ] ) . toBe ( redirectUrl ) ;
1572
1572
} ) ;
1573
1573
} ) ;
1574
1574
@@ -1628,7 +1628,7 @@ describe('Clerk singleton', () => {
1628
1628
1629
1629
await waitFor ( ( ) => {
1630
1630
expect ( mockSetActive ) . not . toHaveBeenCalled ( ) ;
1631
- expect ( mockNavigate ) . toHaveBeenCalledWith ( redirectUrl ) ;
1631
+ expect ( mockNavigate . mock . calls [ 0 ] [ 0 ] ) . toBe ( redirectUrl ) ;
1632
1632
} ) ;
1633
1633
} ) ;
1634
1634
0 commit comments