File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,11 @@ describe(`app-dir-hmr`, () => {
131131 } )
132132
133133 it ( 'should update server components pages when env files is changed (nodejs)' , async ( ) => {
134+ // If "should update server components after navigating to a page with a different runtime" failed, the dev server is in a corrupted state.
135+ // Restart fixes this.
136+ await next . stop ( )
137+ await next . start ( )
138+
134139 const envContent = await next . readFile ( envFile )
135140 const browser = await next . browser ( '/env/node' )
136141 expect ( await browser . elementByCss ( 'p' ) . text ( ) ) . toBe ( 'mac' )
@@ -167,6 +172,10 @@ describe(`app-dir-hmr`, () => {
167172 } )
168173
169174 it ( 'should update server components pages when env files is changed (edge)' , async ( ) => {
175+ // Restart to work around a bug highlighted in the flakiness of "should update server components after navigating to a page with a different runtime"
176+ await next . stop ( )
177+ await next . start ( )
178+
170179 const envContent = await next . readFile ( envFile )
171180 const browser = await next . browser ( '/env/edge' )
172181 expect ( await browser . elementByCss ( 'p' ) . text ( ) ) . toBe ( 'mac' )
You can’t perform that action at this time.
0 commit comments