File tree 1 file changed +9
-0
lines changed
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`, () => {
131
131
} )
132
132
133
133
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
+
134
139
const envContent = await next . readFile ( envFile )
135
140
const browser = await next . browser ( '/env/node' )
136
141
expect ( await browser . elementByCss ( 'p' ) . text ( ) ) . toBe ( 'mac' )
@@ -167,6 +172,10 @@ describe(`app-dir-hmr`, () => {
167
172
} )
168
173
169
174
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
+
170
179
const envContent = await next . readFile ( envFile )
171
180
const browser = await next . browser ( '/env/edge' )
172
181
expect ( await browser . elementByCss ( 'p' ) . text ( ) ) . toBe ( 'mac' )
You can’t perform that action at this time.
0 commit comments