@@ -8,9 +8,10 @@ describe("integration", () => {
8
8
it ( "generates the same matches in renderRoutes and matchRoutes" , ( ) => {
9
9
const rendered = [ ] ;
10
10
11
- const Comp = ( { match, route : { routes } } ) => (
12
- rendered . push ( match ) , renderRoutes ( routes )
13
- ) ;
11
+ function Comp ( { match, route : { routes } } ) {
12
+ rendered . push ( match ) ;
13
+ return renderRoutes ( routes ) ;
14
+ }
14
15
15
16
const routes = [
16
17
{
@@ -60,9 +61,10 @@ describe("integration", () => {
60
61
it ( "generates the same matches in renderRoutes and matchRoutes with pathless routes" , ( ) => {
61
62
const rendered = [ ] ;
62
63
63
- const Comp = ( { match, route : { routes } } ) => (
64
- rendered . push ( match ) , renderRoutes ( routes )
65
- ) ;
64
+ function Comp ( { match, route : { routes } } ) {
65
+ rendered . push ( match ) ;
66
+ return renderRoutes ( routes ) ;
67
+ }
66
68
67
69
const routes = [
68
70
{
@@ -110,9 +112,10 @@ describe("integration", () => {
110
112
it ( "generates the same matches in renderRoutes and matchRoutes with routes using exact" , ( ) => {
111
113
const rendered = [ ] ;
112
114
113
- const Comp = ( { match, route : { routes } } ) => (
114
- rendered . push ( match ) , renderRoutes ( routes )
115
- ) ;
115
+ function Comp ( { match, route : { routes } } ) {
116
+ rendered . push ( match ) ;
117
+ return renderRoutes ( routes ) ;
118
+ }
116
119
117
120
const routes = [
118
121
// should skip
@@ -144,9 +147,10 @@ describe("integration", () => {
144
147
it ( "generates the same matches in renderRoutes and matchRoutes with routes using exact + strict" , ( ) => {
145
148
const rendered = [ ] ;
146
149
147
- const Comp = ( { match, route : { routes } } ) => (
148
- rendered . push ( match ) , renderRoutes ( routes )
149
- ) ;
150
+ function Comp ( { match, route : { routes } } ) {
151
+ rendered . push ( match ) ;
152
+ return renderRoutes ( routes ) ;
153
+ }
150
154
151
155
const routes = [
152
156
// should match
0 commit comments