-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
Copy pathvalidate-options.test.js.snap.webpack5
575 lines (514 loc) · 36.1 KB
/
validate-options.test.js.snap.webpack5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`options validate should throw an error on the "bonjour" option with '' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.bonjour should be one of these:
boolean | object { … }
-> Broadcasts the server via ZeroConf networking on start. https://webpack.js.org/configuration/dev-server/#devserverbonjour
Details:
* configuration.bonjour should be a boolean.
* configuration.bonjour should be an object:
object { … }
-> Options for bonjour, description available at https://github.com/watson/bonjour#initializing"
`;
exports[`options validate should throw an error on the "client" option with '{"host":true,"path":"","port":8080}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.client.host should be a string.
-> Tells clients connected to devServer to use the provided host."
`;
exports[`options validate should throw an error on the "client" option with '{"logging":"silent"}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.client.logging should be one of these:
\\"none\\" | \\"error\\" | \\"warn\\" | \\"info\\" | \\"log\\" | \\"verbose\\""
`;
exports[`options validate should throw an error on the "client" option with '{"logging":"whoops!"}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.client.logging should be one of these:
\\"none\\" | \\"error\\" | \\"warn\\" | \\"info\\" | \\"log\\" | \\"verbose\\""
`;
exports[`options validate should throw an error on the "client" option with '{"needClientEntry":[""]}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.client.needClientEntry should be one of these:
boolean | function
-> Tells devServer to inject a client entry.
Details:
* configuration.client.needClientEntry should be a boolean.
* configuration.client.needClientEntry should be an instance of function."
`;
exports[`options validate should throw an error on the "client" option with '{"needHotEntry":[""]}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.client.needHotEntry should be one of these:
boolean | function
-> Tells devServer to inject a Hot Module Replacement entry.
Details:
* configuration.client.needHotEntry should be a boolean.
* configuration.client.needHotEntry should be an instance of function."
`;
exports[`options validate should throw an error on the "client" option with '{"overlay":""}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.client.overlay should be one of these:
boolean | object { errors?, warnings?, … }
Details:
* configuration.client.overlay should be a boolean.
-> Show a full-screen overlay in the browser when there are compiler errors or warnings.
* configuration.client.overlay should be an object:
object { errors?, warnings?, … }"
`;
exports[`options validate should throw an error on the "client" option with '{"overlay":{"errors":""}}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.client.overlay.errors should be a boolean.
-> Show a full-screen overlay in the browser when there are compiler errors."
`;
exports[`options validate should throw an error on the "client" option with '{"overlay":{"warnings":""}}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.client.overlay.warnings should be a boolean.
-> Show a full-screen overlay in the browser when there are compiler warnings."
`;
exports[`options validate should throw an error on the "client" option with '{"path":true}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.client.path should be a string.
-> Tells clients connected to devServer to use the provided path to connect."
`;
exports[`options validate should throw an error on the "client" option with '{"port":true}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.client.port should be one of these:
number | string | \\"auto\\"
-> Tells clients connected to devServer to use the provided port.
Details:
* configuration.client.port should be a number.
* configuration.client.port should be a string.
* configuration.client.port should be \\"auto\\"."
`;
exports[`options validate should throw an error on the "client" option with '{"progress":""}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.client.progress should be a boolean.
-> Print compilation progress in percentage in the browser."
`;
exports[`options validate should throw an error on the "client" option with '{"unknownOption":true}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.client has an unknown property 'unknownOption'. These properties are valid:
object { host?, path?, port?, logging?, progress?, overlay?, needClientEntry?, needHotEntry? }
-> Specifies client properties. https://webpack.js.org/configuration/dev-server/#devserverclient"
`;
exports[`options validate should throw an error on the "client" option with 'whoops!' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.client should be an object:
object { host?, path?, port?, logging?, progress?, overlay?, needClientEntry?, needHotEntry? }
-> Specifies client properties. https://webpack.js.org/configuration/dev-server/#devserverclient"
`;
exports[`options validate should throw an error on the "compress" option with '' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.compress should be a boolean.
-> Enable gzip compression for everything served. https://webpack.js.org/configuration/dev-server/#devservercompress"
`;
exports[`options validate should throw an error on the "devMiddleware" option with '' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.devMiddleware should be an object:
object { … }
-> Provide options to webpack-dev-middleware which handles webpack assets. https://webpack.js.org/configuration/dev-server/#devserverdevmiddleware"
`;
exports[`options validate should throw an error on the "firewall" option with '' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.firewall should be one of these:
boolean | [string, ...] (should not have fewer than 1 item)
-> Defines routes which are enabled by default, on by default and allows localhost. https://webpack.js.org/configuration/dev-server/#devserverfirewall
Details:
* configuration.firewall should be a boolean.
* configuration.firewall should be an array:
[string, ...] (should not have fewer than 1 item)"
`;
exports[`options validate should throw an error on the "firewall" option with '[]' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.firewall should be an non-empty array."
`;
exports[`options validate should throw an error on the "headers" option with '1' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.headers should be one of these:
object { … } | function
-> Adds headers to all responses. https://webpack.js.org/configuration/dev-server/#devserverheaders
Details:
* configuration.headers should be an object:
object { … }
* configuration.headers should be an instance of function."
`;
exports[`options validate should throw an error on the "headers" option with 'false' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.headers should be one of these:
object { … } | function
-> Adds headers to all responses. https://webpack.js.org/configuration/dev-server/#devserverheaders
Details:
* configuration.headers should be an object:
object { … }
* configuration.headers should be an instance of function."
`;
exports[`options validate should throw an error on the "historyApiFallback" option with '' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.historyApiFallback should be one of these:
boolean | object { … }
-> When using the HTML5 History API, the index.html page will likely have to be served in place of any 404 responses. https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallback
Details:
* configuration.historyApiFallback should be a boolean.
* configuration.historyApiFallback should be an object:
object { … }"
`;
exports[`options validate should throw an error on the "host" option with 'false' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.host should be one of these:
string | null
-> Specify a host to use. If you want your server to be accessible externally. https://webpack.js.org/configuration/dev-server/#devserverhost
Details:
* configuration.host should be a string.
* configuration.host should be a null."
`;
exports[`options validate should throw an error on the "hot" option with '' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.hot should be one of these:
boolean | \\"only\\"
-> Enable webpack's Hot Module Replacement feature. https://webpack.js.org/configuration/dev-server/#devserverhot
Details:
* configuration.hot should be a boolean.
* configuration.hot should be \\"only\\"."
`;
exports[`options validate should throw an error on the "hot" option with 'foo' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.hot should be one of these:
boolean | \\"only\\"
-> Enable webpack's Hot Module Replacement feature. https://webpack.js.org/configuration/dev-server/#devserverhot
Details:
* configuration.hot should be a boolean.
* configuration.hot should be \\"only\\"."
`;
exports[`options validate should throw an error on the "http2" option with '' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.http2 should be a boolean.
-> Serve over HTTP/2 using spdy. https://webpack.js.org/configuration/dev-server/#devserverhttp2"
`;
exports[`options validate should throw an error on the "https" option with '' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.https should be one of these:
boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? }
-> By default, dev-server will be served over HTTP. It can optionally be served over HTTP/2 with HTTPS. https://webpack.js.org/configuration/dev-server/#devserverhttps
Details:
* configuration.https should be a boolean.
* configuration.https should be an object:
object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? }"
`;
exports[`options validate should throw an error on the "https" option with '{"cacert":true}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.https should be one of these:
boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? }
-> By default, dev-server will be served over HTTP. It can optionally be served over HTTP/2 with HTTPS. https://webpack.js.org/configuration/dev-server/#devserverhttps
Details:
* configuration.https.cacert should be one of these:
string | Buffer
-> Path to an SSL CA certificate.
Details:
* configuration.https.cacert should be a string.
* configuration.https.cacert should be an instance of Buffer."
`;
exports[`options validate should throw an error on the "https" option with '{"cert":true}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.https should be one of these:
boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? }
-> By default, dev-server will be served over HTTP. It can optionally be served over HTTP/2 with HTTPS. https://webpack.js.org/configuration/dev-server/#devserverhttps
Details:
* configuration.https.cert should be one of these:
string | Buffer
-> Path to an SSL certificate.
Details:
* configuration.https.cert should be a string.
* configuration.https.cert should be an instance of Buffer."
`;
exports[`options validate should throw an error on the "https" option with '{"foo":"bar"}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.https has an unknown property 'foo'. These properties are valid:
object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? }"
`;
exports[`options validate should throw an error on the "https" option with '{"key":10}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.https should be one of these:
boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? }
-> By default, dev-server will be served over HTTP. It can optionally be served over HTTP/2 with HTTPS. https://webpack.js.org/configuration/dev-server/#devserverhttps
Details:
* configuration.https.key should be one of these:
string | Buffer
-> Path to an SSL key.
Details:
* configuration.https.key should be a string.
* configuration.https.key should be an instance of Buffer."
`;
exports[`options validate should throw an error on the "https" option with '{"passphrase":false}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.https.passphrase should be a string.
-> Passphrase for a pfx file."
`;
exports[`options validate should throw an error on the "https" option with '{"pfx":10}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.https should be one of these:
boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? }
-> By default, dev-server will be served over HTTP. It can optionally be served over HTTP/2 with HTTPS. https://webpack.js.org/configuration/dev-server/#devserverhttps
Details:
* configuration.https.pfx should be one of these:
string | Buffer
-> Path to an SSL pfx file.
Details:
* configuration.https.pfx should be a string.
* configuration.https.pfx should be an instance of Buffer."
`;
exports[`options validate should throw an error on the "https" option with '{"requestCert":"test"}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.https.requestCert should be a boolean.
-> Request for an SSL certificate."
`;
exports[`options validate should throw an error on the "onAfterSetupMiddleware" option with 'false' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.onAfterSetupMiddleware should be an instance of function.
-> Provides the ability to execute custom middleware after all other middleware internally within the server. https://webpack.js.org/configuration/dev-server/#devserverafter"
`;
exports[`options validate should throw an error on the "onBeforeSetupMiddleware" option with 'false' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.onBeforeSetupMiddleware should be an instance of function.
-> Provides the ability to execute custom middleware prior to all other middleware internally within the server. https://webpack.js.org/configuration/dev-server/#devserverbefore"
`;
exports[`options validate should throw an error on the "onListening" option with '' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.onListening should be an instance of function.
-> Provides an option to execute a custom function when webpack-dev-server starts listening for connections on a port. https://webpack.js.org/configuration/dev-server/#onlistening"
`;
exports[`options validate should throw an error on the "open" option with '' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.open should be an non-empty string."
`;
exports[`options validate should throw an error on the "open" option with '[]' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.open should be an non-empty array."
`;
exports[`options validate should throw an error on the "open" option with '{"app":true}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.open should be one of these:
boolean | non-empty string | object { target?, app? } | [non-empty string | object { target?, app? }, ...] (should not have fewer than 1 item)
-> Tells dev-server to open the browser after server had been started. Set it to true to open your default browser. https://webpack.js.org/configuration/dev-server/#devserveropen
Details:
* configuration.open.app should be one of these:
non-empty string | [non-empty string, ...] (should not have fewer than 1 item)
-> Open specified browser.
Details:
* configuration.open.app should be a non-empty string.
* configuration.open.app should be an array:
[non-empty string, ...] (should not have fewer than 1 item)"
`;
exports[`options validate should throw an error on the "open" option with '{"foo":"bar"}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.open has an unknown property 'foo'. These properties are valid:
object { target?, app? }"
`;
exports[`options validate should throw an error on the "open" option with '{"target":90}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.open should be one of these:
boolean | non-empty string | object { target?, app? } | [non-empty string | object { target?, app? }, ...] (should not have fewer than 1 item)
-> Tells dev-server to open the browser after server had been started. Set it to true to open your default browser. https://webpack.js.org/configuration/dev-server/#devserveropen
Details:
* configuration.open.target should be one of these:
boolean | non-empty string | [non-empty string, ...] (should not have fewer than 1 item)
-> Open specified route in browser.
Details:
* configuration.open.target should be a boolean.
* configuration.open.target should be a non-empty string.
* configuration.open.target should be an array:
[non-empty string, ...] (should not have fewer than 1 item)"
`;
exports[`options validate should throw an error on the "port" option with 'false' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.port should be one of these:
number | string | \\"auto\\"
-> Specify a port number to listen for requests on. https://webpack.js.org/configuration/dev-server/#devserverport
Details:
* configuration.port should be a number.
* configuration.port should be a string.
* configuration.port should be \\"auto\\"."
`;
exports[`options validate should throw an error on the "port" option with 'null' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.port should be one of these:
number | string | \\"auto\\"
-> Specify a port number to listen for requests on. https://webpack.js.org/configuration/dev-server/#devserverport
Details:
* configuration.port should be a number.
* configuration.port should be a string.
* configuration.port should be \\"auto\\"."
`;
exports[`options validate should throw an error on the "proxy" option with '[]' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.proxy should be an non-empty array."
`;
exports[`options validate should throw an error on the "proxy" option with 'false' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.proxy should be one of these:
object { … } | [object { … } | function, ...] (should not have fewer than 1 item)
-> Proxying some URLs can be useful when you have a separate API backend development server and you want to send API requests on the same domain. https://webpack.js.org/configuration/dev-server/#devserverproxy
Details:
* configuration.proxy should be an object:
object { … }
* configuration.proxy should be an array:
[object { … } | function, ...] (should not have fewer than 1 item)"
`;
exports[`options validate should throw an error on the "proxy" option with 'function () {}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.proxy should be one of these:
object { … } | [object { … } | function, ...] (should not have fewer than 1 item)
-> Proxying some URLs can be useful when you have a separate API backend development server and you want to send API requests on the same domain. https://webpack.js.org/configuration/dev-server/#devserverproxy
Details:
* configuration.proxy should be an object:
object { … }
* configuration.proxy should be an array:
[object { … } | function, ...] (should not have fewer than 1 item)"
`;
exports[`options validate should throw an error on the "public" option with 'false' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.public should be a string.
-> When using dev server and you're proxying dev-server, the client script does not always know where to connect to. It will try to guess the URL of the server based on window.location, but if that fails you'll need to use this. https://webpack.js.org/configuration/dev-server/#devserverpublic"
`;
exports[`options validate should throw an error on the "static" option with '' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.static should be an non-empty string."
`;
exports[`options validate should throw an error on the "static" option with '{"directory":false}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.static.directory should be a non-empty string.
-> Directory for static contents."
`;
exports[`options validate should throw an error on the "static" option with '{"publicPath":false}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.static should be one of these:
boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? } | [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] (should not have fewer than 1 item)
-> It is possible to configure advanced options for serving static files from directory. See the Express documentation for the possible options. https://webpack.js.org/configuration/dev-server/#devserverstatic
Details:
* configuration.static.publicPath should be one of these:
non-empty string | [non-empty string, ...] (should not have fewer than 1 item)
-> The bundled files will be available in the browser under this path.
Details:
* configuration.static.publicPath should be a non-empty string.
* configuration.static.publicPath should be an array:
[non-empty string, ...] (should not have fewer than 1 item)"
`;
exports[`options validate should throw an error on the "static" option with '{"serveIndex":"true"}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.static should be one of these:
boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? } | [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] (should not have fewer than 1 item)
-> It is possible to configure advanced options for serving static files from directory. See the Express documentation for the possible options. https://webpack.js.org/configuration/dev-server/#devserverstatic
Details:
* configuration.static.serveIndex should be one of these:
boolean | object { … }
-> Tells dev-server to use serveIndex middleware when enabled.
Details:
* configuration.static.serveIndex should be a boolean.
* configuration.static.serveIndex should be an object:
object { … }"
`;
exports[`options validate should throw an error on the "static" option with '{"watch":10}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.static should be one of these:
boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? } | [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] (should not have fewer than 1 item)
-> It is possible to configure advanced options for serving static files from directory. See the Express documentation for the possible options. https://webpack.js.org/configuration/dev-server/#devserverstatic
Details:
* configuration.static.watch should be one of these:
boolean | object { … }
-> Watch for files in static content directory.
Details:
* configuration.static.watch should be a boolean.
* configuration.static.watch should be an object:
object { … }
-> options for watch, description available at https://github.com/paulmillr/chokidar#api"
`;
exports[`options validate should throw an error on the "static" option with '0' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.static should be one of these:
boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? } | [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] (should not have fewer than 1 item)
-> It is possible to configure advanced options for serving static files from directory. See the Express documentation for the possible options. https://webpack.js.org/configuration/dev-server/#devserverstatic
Details:
* configuration.static should be a boolean.
* configuration.static should be a non-empty string.
* configuration.static should be an object:
object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }
* configuration.static should be an array:
[non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] (should not have fewer than 1 item)"
`;
exports[`options validate should throw an error on the "static" option with 'null' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.static should be one of these:
boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? } | [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] (should not have fewer than 1 item)
-> It is possible to configure advanced options for serving static files from directory. See the Express documentation for the possible options. https://webpack.js.org/configuration/dev-server/#devserverstatic
Details:
* configuration.static should be a boolean.
* configuration.static should be a non-empty string.
* configuration.static should be an object:
object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }
* configuration.static should be an array:
[non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] (should not have fewer than 1 item)"
`;
exports[`options validate should throw an error on the "transportMode" option with '{"notAnOption":true}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.transportMode has an unknown property 'notAnOption'. These properties are valid:
object { client?, server? }"
`;
exports[`options validate should throw an error on the "transportMode" option with '{"server":false}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.transportMode should be one of these:
object { client?, server? } | \\"sockjs\\" | \\"ws\\"
-> This option allows us either to choose the current devServer transport mode for client/server individually or to provide custom client/server implementation. https://webpack.js.org/configuration/dev-server/#devservertransportmode
Details:
* configuration.transportMode.server should be one of these:
string | function
Details:
* configuration.transportMode.server should be a string.
* configuration.transportMode.server should be an instance of function."
`;
exports[`options validate should throw an error on the "transportMode" option with '{}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.transportMode.client should be a string."
`;
exports[`options validate should throw an error on the "transportMode" option with 'nonexistent-implementation' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.transportMode should be one of these:
object { client?, server? } | \\"sockjs\\" | \\"ws\\"
-> This option allows us either to choose the current devServer transport mode for client/server individually or to provide custom client/server implementation. https://webpack.js.org/configuration/dev-server/#devservertransportmode
Details:
* configuration.transportMode should be an object:
object { client?, server? }
* configuration.transportMode should be one of these:
\\"sockjs\\" | \\"ws\\""
`;
exports[`options validate should throw an error on the "transportMode" option with 'null' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.transportMode should be one of these:
object { client?, server? } | \\"sockjs\\" | \\"ws\\"
-> This option allows us either to choose the current devServer transport mode for client/server individually or to provide custom client/server implementation. https://webpack.js.org/configuration/dev-server/#devservertransportmode
Details:
* configuration.transportMode should be an object:
object { client?, server? }
* configuration.transportMode should be one of these:
\\"sockjs\\" | \\"ws\\""
`;
exports[`options validate should throw an error on the "watchFiles" option with '123' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.watchFiles should be one of these:
non-empty string | object { paths?, options? } | [non-empty string | object { paths?, options? }, ...]
-> List of files to watch for file changes and serve. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles
Details:
* configuration.watchFiles should be a non-empty string.
* configuration.watchFiles should be an object:
object { paths?, options? }
* configuration.watchFiles should be an array:
[non-empty string | object { paths?, options? }, ...]"
`;
exports[`options validate should throw an error on the "watchFiles" option with 'false' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.watchFiles should be one of these:
non-empty string | object { paths?, options? } | [non-empty string | object { paths?, options? }, ...]
-> List of files to watch for file changes and serve. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles
Details:
* configuration.watchFiles should be a non-empty string.
* configuration.watchFiles should be an object:
object { paths?, options? }
* configuration.watchFiles should be an array:
[non-empty string | object { paths?, options? }, ...]"
`;