@@ -17,19 +17,19 @@ createNextDescribe(
17
17
} ,
18
18
( { next, isNextDev } ) => {
19
19
it . each ( [
20
- { pathname : '/first ' , content : [ 'hello from first app' ] } ,
21
- { pathname : '/second ' , content : [ 'hello from second app' ] } ,
20
+ { pathname : '/' , content : [ 'hello from host app' ] } ,
21
+ { pathname : '/guest ' , content : [ 'hello from guest app' ] } ,
22
22
{
23
- pathname : '/first/ blog/post-1' ,
24
- content : [ 'hello from first app /blog/[slug]' ] ,
23
+ pathname : '/blog/post-1' ,
24
+ content : [ 'hello from host app /blog/[slug]' ] ,
25
25
} ,
26
26
{
27
- pathname : '/second /blog/post-1' ,
28
- content : [ 'hello from second app /blog/[slug]' ] ,
27
+ pathname : '/guest /blog/post-1' ,
28
+ content : [ 'hello from guest app /blog/[slug]' ] ,
29
29
} ,
30
30
{
31
- pathname : '/second /another/post-1' ,
32
- content : [ 'hello from second app /another/[slug]' ] ,
31
+ pathname : '/guest /another/post-1' ,
32
+ content : [ 'hello from guest app /another/[slug]' ] ,
33
33
} ,
34
34
] ) (
35
35
'should correctly respond for $pathname' ,
@@ -49,7 +49,8 @@ createNextDescribe(
49
49
50
50
if ( isNextDev ) {
51
51
async function runHMRTest ( app : string ) {
52
- const browser = await next . browser ( `/${ app } ` )
52
+ const isHostApp = app === 'host'
53
+ const browser = await next . browser ( isHostApp ? '/' : app )
53
54
expect ( await browser . elementByCss ( 'body' ) . text ( ) ) . toContain (
54
55
`hello from ${ app } app`
55
56
)
@@ -82,8 +83,8 @@ createNextDescribe(
82
83
}
83
84
84
85
it ( 'should support HMR in both apps' , async ( ) => {
85
- await runHMRTest ( 'first ' )
86
- await runHMRTest ( 'second ' )
86
+ await runHMRTest ( 'host ' )
87
+ await runHMRTest ( 'guest ' )
87
88
} )
88
89
}
89
90
}
0 commit comments