Skip to content

Commit 6f9d87f

Browse files
committed
test: refactor and check for page reload
1 parent e495954 commit 6f9d87f

File tree

3 files changed

+388
-239
lines changed

3 files changed

+388
-239
lines changed
Lines changed: 129 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,46 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`watchFiles option should not crash if wile doesn't exist should handle GET request to bundle file: console messages 1`] = `Array []`;
3+
exports[`watchFiles option should not crash if file doesn't exist should reload when file content is changed: console messages 1`] = `
4+
Array [
5+
"Hey.",
6+
]
7+
`;
48

5-
exports[`watchFiles option should not crash if wile doesn't exist should handle GET request to bundle file: page errors 1`] = `Array []`;
9+
exports[`watchFiles option should not crash if file doesn't exist should reload when file content is changed: page errors 1`] = `Array []`;
610

7-
exports[`watchFiles option should not crash if wile doesn't exist should handle GET request to bundle file: response status 1`] = `200`;
11+
exports[`watchFiles option should not crash if file doesn't exist should reload when file content is changed: response status 1`] = `200`;
812

9-
exports[`watchFiles option should work with array config should handle GET request to bundle file: console messages 1`] = `Array []`;
13+
exports[`watchFiles option should work with array config should reload when file content is changed: console messages 1`] = `
14+
Array [
15+
"Hey.",
16+
]
17+
`;
1018

11-
exports[`watchFiles option should work with array config should handle GET request to bundle file: page errors 1`] = `Array []`;
19+
exports[`watchFiles option should work with array config should reload when file content is changed: page errors 1`] = `Array []`;
1220

13-
exports[`watchFiles option should work with array config should handle GET request to bundle file: response status 1`] = `200`;
21+
exports[`watchFiles option should work with array config should reload when file content is changed: response status 1`] = `200`;
1422

15-
exports[`watchFiles option should work with object with multiple paths should handle GET request to bundle file: console messages 1`] = `Array []`;
23+
exports[`watchFiles option should work with object with multiple paths should reload when file content is changed: console messages 1`] = `
24+
Array [
25+
"Hey.",
26+
]
27+
`;
1628

17-
exports[`watchFiles option should work with object with multiple paths should handle GET request to bundle file: page errors 1`] = `Array []`;
29+
exports[`watchFiles option should work with object with multiple paths should reload when file content is changed: page errors 1`] = `Array []`;
1830

19-
exports[`watchFiles option should work with object with multiple paths should handle GET request to bundle file: response status 1`] = `200`;
31+
exports[`watchFiles option should work with object with multiple paths should reload when file content is changed: response status 1`] = `200`;
2032

21-
exports[`watchFiles option should work with object with single path should handle GET request to bundle file: console messages 1`] = `Array []`;
33+
exports[`watchFiles option should work with object with single path should reload when file content is changed: console messages 1`] = `
34+
Array [
35+
"Hey.",
36+
]
37+
`;
2238

23-
exports[`watchFiles option should work with object with single path should handle GET request to bundle file: page errors 1`] = `Array []`;
39+
exports[`watchFiles option should work with object with single path should reload when file content is changed: page errors 1`] = `Array []`;
2440

25-
exports[`watchFiles option should work with object with single path should handle GET request to bundle file: response status 1`] = `200`;
41+
exports[`watchFiles option should work with object with single path should reload when file content is changed: response status 1`] = `200`;
2642

27-
exports[`watchFiles option should work with options {"interval":400,"poll":200} should handle GET request to bundle file 1`] = `
43+
exports[`watchFiles option should work with options {"interval":400,"poll":200} should reload when file content is changed 1`] = `
2844
Object {
2945
"alwaysStat": true,
3046
"atomic": false,
@@ -38,13 +54,17 @@ Object {
3854
}
3955
`;
4056

41-
exports[`watchFiles option should work with options {"interval":400,"poll":200} should handle GET request to bundle file: console messages 1`] = `Array []`;
57+
exports[`watchFiles option should work with options {"interval":400,"poll":200} should reload when file content is changed: console messages 1`] = `
58+
Array [
59+
"Hey.",
60+
]
61+
`;
4262

43-
exports[`watchFiles option should work with options {"interval":400,"poll":200} should handle GET request to bundle file: page errors 1`] = `Array []`;
63+
exports[`watchFiles option should work with options {"interval":400,"poll":200} should reload when file content is changed: page errors 1`] = `Array []`;
4464

45-
exports[`watchFiles option should work with options {"interval":400,"poll":200} should handle GET request to bundle file: response status 1`] = `200`;
65+
exports[`watchFiles option should work with options {"interval":400,"poll":200} should reload when file content is changed: response status 1`] = `200`;
4666

47-
exports[`watchFiles option should work with options {"poll":200} should handle GET request to bundle file 1`] = `
67+
exports[`watchFiles option should work with options {"poll":200} should reload when file content is changed 1`] = `
4868
Object {
4969
"alwaysStat": true,
5070
"atomic": false,
@@ -58,13 +78,17 @@ Object {
5878
}
5979
`;
6080

61-
exports[`watchFiles option should work with options {"poll":200} should handle GET request to bundle file: console messages 1`] = `Array []`;
81+
exports[`watchFiles option should work with options {"poll":200} should reload when file content is changed: console messages 1`] = `
82+
Array [
83+
"Hey.",
84+
]
85+
`;
6286

63-
exports[`watchFiles option should work with options {"poll":200} should handle GET request to bundle file: page errors 1`] = `Array []`;
87+
exports[`watchFiles option should work with options {"poll":200} should reload when file content is changed: page errors 1`] = `Array []`;
6488

65-
exports[`watchFiles option should work with options {"poll":200} should handle GET request to bundle file: response status 1`] = `200`;
89+
exports[`watchFiles option should work with options {"poll":200} should reload when file content is changed: response status 1`] = `200`;
6690

67-
exports[`watchFiles option should work with options {"poll":true} should handle GET request to bundle file 1`] = `
91+
exports[`watchFiles option should work with options {"poll":true} should reload when file content is changed 1`] = `
6892
Object {
6993
"alwaysStat": true,
7094
"atomic": false,
@@ -78,13 +102,17 @@ Object {
78102
}
79103
`;
80104

81-
exports[`watchFiles option should work with options {"poll":true} should handle GET request to bundle file: console messages 1`] = `Array []`;
105+
exports[`watchFiles option should work with options {"poll":true} should reload when file content is changed: console messages 1`] = `
106+
Array [
107+
"Hey.",
108+
]
109+
`;
82110

83-
exports[`watchFiles option should work with options {"poll":true} should handle GET request to bundle file: page errors 1`] = `Array []`;
111+
exports[`watchFiles option should work with options {"poll":true} should reload when file content is changed: page errors 1`] = `Array []`;
84112

85-
exports[`watchFiles option should work with options {"poll":true} should handle GET request to bundle file: response status 1`] = `200`;
113+
exports[`watchFiles option should work with options {"poll":true} should reload when file content is changed: response status 1`] = `200`;
86114

87-
exports[`watchFiles option should work with options {"usePolling":false,"interval":200,"poll":400} should handle GET request to bundle file 1`] = `
115+
exports[`watchFiles option should work with options {"usePolling":false,"interval":200,"poll":400} should reload when file content is changed 1`] = `
88116
Object {
89117
"alwaysStat": true,
90118
"atomic": false,
@@ -98,13 +126,17 @@ Object {
98126
}
99127
`;
100128

101-
exports[`watchFiles option should work with options {"usePolling":false,"interval":200,"poll":400} should handle GET request to bundle file: console messages 1`] = `Array []`;
129+
exports[`watchFiles option should work with options {"usePolling":false,"interval":200,"poll":400} should reload when file content is changed: console messages 1`] = `
130+
Array [
131+
"Hey.",
132+
]
133+
`;
102134

103-
exports[`watchFiles option should work with options {"usePolling":false,"interval":200,"poll":400} should handle GET request to bundle file: page errors 1`] = `Array []`;
135+
exports[`watchFiles option should work with options {"usePolling":false,"interval":200,"poll":400} should reload when file content is changed: page errors 1`] = `Array []`;
104136

105-
exports[`watchFiles option should work with options {"usePolling":false,"interval":200,"poll":400} should handle GET request to bundle file: response status 1`] = `200`;
137+
exports[`watchFiles option should work with options {"usePolling":false,"interval":200,"poll":400} should reload when file content is changed: response status 1`] = `200`;
106138

107-
exports[`watchFiles option should work with options {"usePolling":false,"poll":200} should handle GET request to bundle file 1`] = `
139+
exports[`watchFiles option should work with options {"usePolling":false,"poll":200} should reload when file content is changed 1`] = `
108140
Object {
109141
"alwaysStat": true,
110142
"atomic": false,
@@ -118,13 +150,17 @@ Object {
118150
}
119151
`;
120152

121-
exports[`watchFiles option should work with options {"usePolling":false,"poll":200} should handle GET request to bundle file: console messages 1`] = `Array []`;
153+
exports[`watchFiles option should work with options {"usePolling":false,"poll":200} should reload when file content is changed: console messages 1`] = `
154+
Array [
155+
"Hey.",
156+
]
157+
`;
122158

123-
exports[`watchFiles option should work with options {"usePolling":false,"poll":200} should handle GET request to bundle file: page errors 1`] = `Array []`;
159+
exports[`watchFiles option should work with options {"usePolling":false,"poll":200} should reload when file content is changed: page errors 1`] = `Array []`;
124160

125-
exports[`watchFiles option should work with options {"usePolling":false,"poll":200} should handle GET request to bundle file: response status 1`] = `200`;
161+
exports[`watchFiles option should work with options {"usePolling":false,"poll":200} should reload when file content is changed: response status 1`] = `200`;
126162

127-
exports[`watchFiles option should work with options {"usePolling":false,"poll":true} should handle GET request to bundle file 1`] = `
163+
exports[`watchFiles option should work with options {"usePolling":false,"poll":true} should reload when file content is changed 1`] = `
128164
Object {
129165
"alwaysStat": true,
130166
"atomic": false,
@@ -138,13 +174,17 @@ Object {
138174
}
139175
`;
140176

141-
exports[`watchFiles option should work with options {"usePolling":false,"poll":true} should handle GET request to bundle file: console messages 1`] = `Array []`;
177+
exports[`watchFiles option should work with options {"usePolling":false,"poll":true} should reload when file content is changed: console messages 1`] = `
178+
Array [
179+
"Hey.",
180+
]
181+
`;
142182

143-
exports[`watchFiles option should work with options {"usePolling":false,"poll":true} should handle GET request to bundle file: page errors 1`] = `Array []`;
183+
exports[`watchFiles option should work with options {"usePolling":false,"poll":true} should reload when file content is changed: page errors 1`] = `Array []`;
144184

145-
exports[`watchFiles option should work with options {"usePolling":false,"poll":true} should handle GET request to bundle file: response status 1`] = `200`;
185+
exports[`watchFiles option should work with options {"usePolling":false,"poll":true} should reload when file content is changed: response status 1`] = `200`;
146186

147-
exports[`watchFiles option should work with options {"usePolling":false} should handle GET request to bundle file 1`] = `
187+
exports[`watchFiles option should work with options {"usePolling":false} should reload when file content is changed 1`] = `
148188
Object {
149189
"alwaysStat": true,
150190
"atomic": false,
@@ -158,13 +198,17 @@ Object {
158198
}
159199
`;
160200

161-
exports[`watchFiles option should work with options {"usePolling":false} should handle GET request to bundle file: console messages 1`] = `Array []`;
201+
exports[`watchFiles option should work with options {"usePolling":false} should reload when file content is changed: console messages 1`] = `
202+
Array [
203+
"Hey.",
204+
]
205+
`;
162206

163-
exports[`watchFiles option should work with options {"usePolling":false} should handle GET request to bundle file: page errors 1`] = `Array []`;
207+
exports[`watchFiles option should work with options {"usePolling":false} should reload when file content is changed: page errors 1`] = `Array []`;
164208

165-
exports[`watchFiles option should work with options {"usePolling":false} should handle GET request to bundle file: response status 1`] = `200`;
209+
exports[`watchFiles option should work with options {"usePolling":false} should reload when file content is changed: response status 1`] = `200`;
166210

167-
exports[`watchFiles option should work with options {"usePolling":true,"interval":200,"poll":400} should handle GET request to bundle file 1`] = `
211+
exports[`watchFiles option should work with options {"usePolling":true,"interval":200,"poll":400} should reload when file content is changed 1`] = `
168212
Object {
169213
"alwaysStat": true,
170214
"atomic": false,
@@ -178,13 +222,17 @@ Object {
178222
}
179223
`;
180224

181-
exports[`watchFiles option should work with options {"usePolling":true,"interval":200,"poll":400} should handle GET request to bundle file: console messages 1`] = `Array []`;
225+
exports[`watchFiles option should work with options {"usePolling":true,"interval":200,"poll":400} should reload when file content is changed: console messages 1`] = `
226+
Array [
227+
"Hey.",
228+
]
229+
`;
182230

183-
exports[`watchFiles option should work with options {"usePolling":true,"interval":200,"poll":400} should handle GET request to bundle file: page errors 1`] = `Array []`;
231+
exports[`watchFiles option should work with options {"usePolling":true,"interval":200,"poll":400} should reload when file content is changed: page errors 1`] = `Array []`;
184232

185-
exports[`watchFiles option should work with options {"usePolling":true,"interval":200,"poll":400} should handle GET request to bundle file: response status 1`] = `200`;
233+
exports[`watchFiles option should work with options {"usePolling":true,"interval":200,"poll":400} should reload when file content is changed: response status 1`] = `200`;
186234

187-
exports[`watchFiles option should work with options {"usePolling":true,"poll":200} should handle GET request to bundle file 1`] = `
235+
exports[`watchFiles option should work with options {"usePolling":true,"poll":200} should reload when file content is changed 1`] = `
188236
Object {
189237
"alwaysStat": true,
190238
"atomic": false,
@@ -198,13 +246,17 @@ Object {
198246
}
199247
`;
200248

201-
exports[`watchFiles option should work with options {"usePolling":true,"poll":200} should handle GET request to bundle file: console messages 1`] = `Array []`;
249+
exports[`watchFiles option should work with options {"usePolling":true,"poll":200} should reload when file content is changed: console messages 1`] = `
250+
Array [
251+
"Hey.",
252+
]
253+
`;
202254

203-
exports[`watchFiles option should work with options {"usePolling":true,"poll":200} should handle GET request to bundle file: page errors 1`] = `Array []`;
255+
exports[`watchFiles option should work with options {"usePolling":true,"poll":200} should reload when file content is changed: page errors 1`] = `Array []`;
204256

205-
exports[`watchFiles option should work with options {"usePolling":true,"poll":200} should handle GET request to bundle file: response status 1`] = `200`;
257+
exports[`watchFiles option should work with options {"usePolling":true,"poll":200} should reload when file content is changed: response status 1`] = `200`;
206258

207-
exports[`watchFiles option should work with options {"usePolling":true} should handle GET request to bundle file 1`] = `
259+
exports[`watchFiles option should work with options {"usePolling":true} should reload when file content is changed 1`] = `
208260
Object {
209261
"alwaysStat": true,
210262
"atomic": false,
@@ -218,26 +270,42 @@ Object {
218270
}
219271
`;
220272

221-
exports[`watchFiles option should work with options {"usePolling":true} should handle GET request to bundle file: console messages 1`] = `Array []`;
273+
exports[`watchFiles option should work with options {"usePolling":true} should reload when file content is changed: console messages 1`] = `
274+
Array [
275+
"Hey.",
276+
]
277+
`;
222278

223-
exports[`watchFiles option should work with options {"usePolling":true} should handle GET request to bundle file: page errors 1`] = `Array []`;
279+
exports[`watchFiles option should work with options {"usePolling":true} should reload when file content is changed: page errors 1`] = `Array []`;
224280

225-
exports[`watchFiles option should work with options {"usePolling":true} should handle GET request to bundle file: response status 1`] = `200`;
281+
exports[`watchFiles option should work with options {"usePolling":true} should reload when file content is changed: response status 1`] = `200`;
226282

227-
exports[`watchFiles option should work with string and glob should handle GET request to bundle file: console messages 1`] = `Array []`;
283+
exports[`watchFiles option should work with string and glob should reload when file content is changed: console messages 1`] = `
284+
Array [
285+
"Hey.",
286+
]
287+
`;
228288

229-
exports[`watchFiles option should work with string and glob should handle GET request to bundle file: page errors 1`] = `Array []`;
289+
exports[`watchFiles option should work with string and glob should reload when file content is changed: page errors 1`] = `Array []`;
230290

231-
exports[`watchFiles option should work with string and glob should handle GET request to bundle file: response status 1`] = `200`;
291+
exports[`watchFiles option should work with string and glob should reload when file content is changed: response status 1`] = `200`;
232292

233-
exports[`watchFiles option should work with string and path to directory should handle GET request to bundle file: console messages 1`] = `Array []`;
293+
exports[`watchFiles option should work with string and path to directory should reload when file content is changed: console messages 1`] = `
294+
Array [
295+
"Hey.",
296+
]
297+
`;
234298

235-
exports[`watchFiles option should work with string and path to directory should handle GET request to bundle file: page errors 1`] = `Array []`;
299+
exports[`watchFiles option should work with string and path to directory should reload when file content is changed: page errors 1`] = `Array []`;
236300

237-
exports[`watchFiles option should work with string and path to directory should handle GET request to bundle file: response status 1`] = `200`;
301+
exports[`watchFiles option should work with string and path to directory should reload when file content is changed: response status 1`] = `200`;
238302

239-
exports[`watchFiles option should work with string and path to file should handle GET request to bundle file: console messages 1`] = `Array []`;
303+
exports[`watchFiles option should work with string and path to file should reload when file content is changed: console messages 1`] = `
304+
Array [
305+
"Hey.",
306+
]
307+
`;
240308

241-
exports[`watchFiles option should work with string and path to file should handle GET request to bundle file: page errors 1`] = `Array []`;
309+
exports[`watchFiles option should work with string and path to file should reload when file content is changed: page errors 1`] = `Array []`;
242310

243-
exports[`watchFiles option should work with string and path to file should handle GET request to bundle file: response status 1`] = `200`;
311+
exports[`watchFiles option should work with string and path to file should reload when file content is changed: response status 1`] = `200`;

0 commit comments

Comments
 (0)