@@ -1573,9 +1573,7 @@ test.each([true, false])(
1573
1573
1574
1574
fireEvent . click ( postsButton )
1575
1575
1576
- expect (
1577
- await screen . findByTestId ( 'posts-index-heading' ) ,
1578
- ) . toBeInTheDocument ( )
1576
+ expect ( await screen . findByTestId ( 'posts-index-heading' ) ) . toBeInTheDocument ( )
1579
1577
expect ( window . location . pathname ) . toEqual ( `/posts${ tail } ` )
1580
1578
1581
1579
const firstPostButton = await screen . findByTestId ( 'first-post-btn' )
@@ -1741,9 +1739,7 @@ test.each([true, false])(
1741
1739
1742
1740
fireEvent . click ( postsButton )
1743
1741
1744
- expect (
1745
- await screen . findByTestId ( 'posts-index-heading' ) ,
1746
- ) . toBeInTheDocument ( )
1742
+ expect ( await screen . findByTestId ( 'posts-index-heading' ) ) . toBeInTheDocument ( )
1747
1743
1748
1744
const post1Button = await screen . findByTestId ( 'first-post-btn' )
1749
1745
@@ -1873,7 +1869,7 @@ test.each([true, false])(
1873
1869
1874
1870
expect ( router . state . location . pathname ) . toBe ( `/` )
1875
1871
expect ( router . state . location . search ) . toEqual ( { } )
1876
- }
1872
+ } ,
1877
1873
)
1878
1874
1879
1875
test . each ( [ true , false ] ) (
@@ -2058,9 +2054,7 @@ test.each([true, false])(
2058
2054
2059
2055
fireEvent . click ( postsButton )
2060
2056
2061
- expect (
2062
- await screen . findByTestId ( 'posts-index-heading' ) ,
2063
- ) . toBeInTheDocument ( )
2057
+ expect ( await screen . findByTestId ( 'posts-index-heading' ) ) . toBeInTheDocument ( )
2064
2058
expect ( window . location . pathname ) . toEqual ( `/posts${ tail } ` )
2065
2059
2066
2060
const firstPostButton = await screen . findByTestId ( 'first-post-btn' )
@@ -2095,18 +2089,14 @@ test.each([true, false])(
2095
2089
2096
2090
fireEvent . click ( postNotesButton )
2097
2091
2098
- expect (
2099
- await screen . findByTestId ( 'post-notes-heading' ) ,
2100
- ) . toBeInTheDocument ( )
2092
+ expect ( await screen . findByTestId ( 'post-notes-heading' ) ) . toBeInTheDocument ( )
2101
2093
expect ( window . location . pathname ) . toEqual ( `/posts/1/notes${ tail } ` )
2102
2094
2103
2095
const toPostsIndexButton = await screen . findByTestId ( 'to-posts-index-btn' )
2104
2096
2105
2097
fireEvent . click ( toPostsIndexButton )
2106
2098
2107
- expect (
2108
- await screen . findByTestId ( 'posts-index-heading' ) ,
2109
- ) . toBeInTheDocument ( )
2099
+ expect ( await screen . findByTestId ( 'posts-index-heading' ) ) . toBeInTheDocument ( )
2110
2100
expect ( screen . queryByTestId ( 'post-notes-heading' ) ) . not . toBeInTheDocument ( )
2111
2101
expect (
2112
2102
screen . queryByTestId ( 'post-detail-index-heading' ) ,
@@ -2357,9 +2347,7 @@ describe.each([{ basepath: '' }, { basepath: '/basepath' }])(
2357
2347
Link to .. from /param/foo/a
2358
2348
</ button >
2359
2349
< button
2360
- onClick = { ( ) =>
2361
- navigate ( { to : '..' } )
2362
- }
2350
+ onClick = { ( ) => navigate ( { to : '..' } ) }
2363
2351
data-testid = { 'link-to-previous' }
2364
2352
>
2365
2353
Link to .. from current active route
@@ -2533,7 +2521,6 @@ describe.each([{ basepath: '' }, { basepath: '/basepath' }])(
2533
2521
expect ( window . location . pathname ) . toBe ( `${ basepath } /param/foo/a` )
2534
2522
} )
2535
2523
2536
-
2537
2524
test ( 'should navigate to same route with different params' , async ( ) => {
2538
2525
const router = setupRouter ( )
2539
2526
0 commit comments