@@ -334,7 +334,7 @@ describe("trailing slashes", () => {
334
334
describe ( "with a basename that does not contain a trailing slash" , ( ) => {
335
335
test ( "never includes trailing slashes on root links (/)" , ( ) => {
336
336
let window = getWindowImpl ( "/foo/bar" ) ;
337
- spyOn ( window . history , "pushState" ) . and . callThrough ( ) ;
337
+ jest . spyOn ( window . history , "pushState" ) ;
338
338
expect ( window . location . href ) . toBe ( "https://remix.run/foo/bar" ) ;
339
339
340
340
act ( ( ) => {
@@ -353,7 +353,7 @@ describe("trailing slashes", () => {
353
353
354
354
test ( "never includes trailing slashes on root links (../)" , ( ) => {
355
355
let window = getWindowImpl ( "/foo/bar" ) ;
356
- spyOn ( window . history , "pushState" ) . and . callThrough ( ) ;
356
+ jest . spyOn ( window . history , "pushState" ) ;
357
357
expect ( window . location . href ) . toBe ( "https://remix.run/foo/bar" ) ;
358
358
359
359
act ( ( ) => {
@@ -372,7 +372,7 @@ describe("trailing slashes", () => {
372
372
373
373
test ( "allows non-root links to leave off trailing slashes" , ( ) => {
374
374
let window = getWindowImpl ( "/foo" ) ;
375
- spyOn ( window . history , "pushState" ) . and . callThrough ( ) ;
375
+ jest . spyOn ( window . history , "pushState" ) ;
376
376
377
377
expect ( window . location . href ) . toBe ( "https://remix.run/foo" ) ;
378
378
@@ -393,7 +393,7 @@ describe("trailing slashes", () => {
393
393
394
394
test ( "allows non-root links to include trailing slashes" , ( ) => {
395
395
let window = getWindowImpl ( "/foo" ) ;
396
- spyOn ( window . history , "pushState" ) . and . callThrough ( ) ;
396
+ jest . spyOn ( window . history , "pushState" ) ;
397
397
398
398
expect ( window . location . href ) . toBe ( "https://remix.run/foo" ) ;
399
399
@@ -416,7 +416,7 @@ describe("trailing slashes", () => {
416
416
describe ( "with a basename that contains a trailing slash" , ( ) => {
417
417
test ( "always includes trailing slashes on root links (/)" , ( ) => {
418
418
let window = getWindowImpl ( "/foo/bar" ) ;
419
- spyOn ( window . history , "pushState" ) . and . callThrough ( ) ;
419
+ jest . spyOn ( window . history , "pushState" ) ;
420
420
expect ( window . location . href ) . toBe ( "https://remix.run/foo/bar" ) ;
421
421
422
422
act ( ( ) => {
@@ -435,7 +435,7 @@ describe("trailing slashes", () => {
435
435
436
436
test ( "always includes trailing slashes on root links (../)" , ( ) => {
437
437
let window = getWindowImpl ( "/foo/bar" ) ;
438
- spyOn ( window . history , "pushState" ) . and . callThrough ( ) ;
438
+ jest . spyOn ( window . history , "pushState" ) ;
439
439
expect ( window . location . href ) . toBe ( "https://remix.run/foo/bar" ) ;
440
440
441
441
act ( ( ) => {
@@ -454,7 +454,7 @@ describe("trailing slashes", () => {
454
454
455
455
test ( "allows non-root links to leave off trailing slashes" , ( ) => {
456
456
let window = getWindowImpl ( "/foo/" ) ;
457
- spyOn ( window . history , "pushState" ) . and . callThrough ( ) ;
457
+ jest . spyOn ( window . history , "pushState" ) ;
458
458
459
459
expect ( window . location . href ) . toBe ( "https://remix.run/foo/" ) ;
460
460
@@ -475,7 +475,7 @@ describe("trailing slashes", () => {
475
475
476
476
test ( "allows non-root links to include trailing slashes" , ( ) => {
477
477
let window = getWindowImpl ( "/foo/" ) ;
478
- spyOn ( window . history , "pushState" ) . and . callThrough ( ) ;
478
+ jest . spyOn ( window . history , "pushState" ) ;
479
479
480
480
expect ( window . location . href ) . toBe ( "https://remix.run/foo/" ) ;
481
481
@@ -498,7 +498,7 @@ describe("trailing slashes", () => {
498
498
describe ( "empty string paths" , ( ) => {
499
499
it ( "should not add trailing slashes" , ( ) => {
500
500
let window = getWindowImpl ( "/foo/bar" ) ;
501
- spyOn ( window . history , "pushState" ) . and . callThrough ( ) ;
501
+ jest . spyOn ( window . history , "pushState" ) ;
502
502
503
503
expect ( window . location . href ) . toBe ( "https://remix.run/foo/bar" ) ;
504
504
@@ -519,7 +519,7 @@ describe("trailing slashes", () => {
519
519
520
520
it ( "should preserve trailing slash" , ( ) => {
521
521
let window = getWindowImpl ( "/foo/bar/" ) ;
522
- spyOn ( window . history , "pushState" ) . and . callThrough ( ) ;
522
+ jest . spyOn ( window . history , "pushState" ) ;
523
523
524
524
expect ( window . location . href ) . toBe ( "https://remix.run/foo/bar/" ) ;
525
525
@@ -542,7 +542,7 @@ describe("trailing slashes", () => {
542
542
describe ( "current location '.' paths" , ( ) => {
543
543
it ( "should not add trailing slash" , ( ) => {
544
544
let window = getWindowImpl ( "/foo/bar" ) ;
545
- spyOn ( window . history , "pushState" ) . and . callThrough ( ) ;
545
+ jest . spyOn ( window . history , "pushState" ) ;
546
546
547
547
expect ( window . location . href ) . toBe ( "https://remix.run/foo/bar" ) ;
548
548
@@ -570,7 +570,7 @@ describe("trailing slashes", () => {
570
570
571
571
it ( "should preserve trailing slash" , ( ) => {
572
572
let window = getWindowImpl ( "/foo/bar/" ) ;
573
- spyOn ( window . history , "pushState" ) . and . callThrough ( ) ;
573
+ jest . spyOn ( window . history , "pushState" ) ;
574
574
575
575
expect ( window . location . href ) . toBe ( "https://remix.run/foo/bar/" ) ;
576
576
@@ -601,7 +601,7 @@ describe("trailing slashes", () => {
601
601
describe ( "when using setSearchParams" , ( ) => {
602
602
it ( "should not include trailing slash via useSearchParams" , ( ) => {
603
603
let window = getWindowImpl ( "/foo" ) ;
604
- spyOn ( window . history , "pushState" ) . and . callThrough ( ) ;
604
+ jest . spyOn ( window . history , "pushState" ) ;
605
605
606
606
expect ( window . location . href ) . toBe ( "https://remix.run/foo" ) ;
607
607
@@ -630,7 +630,7 @@ describe("trailing slashes", () => {
630
630
631
631
it ( "should include trailing slash via useSearchParams when basename has one" , ( ) => {
632
632
let window = getWindowImpl ( "/foo/" ) ;
633
- spyOn ( window . history , "pushState" ) . and . callThrough ( ) ;
633
+ jest . spyOn ( window . history , "pushState" ) ;
634
634
635
635
expect ( window . location . href ) . toBe ( "https://remix.run/foo/" ) ;
636
636
0 commit comments