@@ -45,9 +45,14 @@ describe("client.reconnect option", () => {
45
45
waitUntil : "networkidle0" ,
46
46
} ) ;
47
47
48
- expect ( response . status ( ) ) . toMatchSnapshot ( "response status" ) ;
48
+ try {
49
+ expect ( response . status ( ) ) . toMatchSnapshot ( "response status" ) ;
50
+ } catch ( error ) {
51
+ throw error ;
52
+ } finally {
53
+ await server . stop ( ) ;
54
+ }
49
55
50
- await server . stop ( ) ;
51
56
// Can't wait to check for unlimited times so wait only for 5-6 retries
52
57
// eslint-disable-next-line no-restricted-properties
53
58
await page . waitForTimeout ( 1000 * Math . pow ( 2 , 5 ) + Math . random ( ) * 100 ) ;
@@ -101,9 +106,14 @@ describe("client.reconnect option", () => {
101
106
waitUntil : "networkidle0" ,
102
107
} ) ;
103
108
104
- expect ( response . status ( ) ) . toMatchSnapshot ( "response status" ) ;
109
+ try {
110
+ expect ( response . status ( ) ) . toMatchSnapshot ( "response status" ) ;
111
+ } catch ( error ) {
112
+ throw error ;
113
+ } finally {
114
+ await server . stop ( ) ;
115
+ }
105
116
106
- await server . stop ( ) ;
107
117
// Can't wait to check for unlimited times so wait only for 5-6 retries
108
118
// eslint-disable-next-line no-restricted-properties
109
119
await page . waitForTimeout ( 1000 * Math . pow ( 2 , 2 ) + Math . random ( ) * 100 ) ;
@@ -154,9 +164,14 @@ describe("client.reconnect option", () => {
154
164
waitUntil : "networkidle0" ,
155
165
} ) ;
156
166
157
- expect ( response . status ( ) ) . toMatchSnapshot ( "response status" ) ;
167
+ try {
168
+ expect ( response . status ( ) ) . toMatchSnapshot ( "response status" ) ;
169
+ } catch ( error ) {
170
+ throw error ;
171
+ } finally {
172
+ await server . stop ( ) ;
173
+ }
158
174
159
- await server . stop ( ) ;
160
175
// eslint-disable-next-line no-restricted-properties
161
176
await page . waitForTimeout ( 1000 * Math . pow ( 2 , 3 ) + Math . random ( ) * 100 ) ;
162
177
0 commit comments