-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
Copy pathvalidate-options.test.js.snap.webpack5
650 lines (582 loc) · 39.2 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
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`options validate should throw an error on the "allowedHosts" option with '[""]' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.allowedHosts[0] should be an non-empty string."
`;
exports[`options validate should throw an error on the "allowedHosts" option with '[]' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.allowedHosts should be an non-empty array."
`;
exports[`options validate should throw an error on the "allowedHosts" option with '123' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.allowedHosts should be one of these:
[non-empty string, ...] (should not have fewer than 1 item) | \\"auto\\" | \\"all\\" | non-empty string
-> Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts
Details:
* options.allowedHosts should be an array:
[non-empty string, ...] (should not have fewer than 1 item)
* options.allowedHosts should be one of these:
\\"auto\\" | \\"all\\"
* options.allowedHosts should be a non-empty string."
`;
exports[`options validate should throw an error on the "allowedHosts" option with 'false' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.allowedHosts should be one of these:
[non-empty string, ...] (should not have fewer than 1 item) | \\"auto\\" | \\"all\\" | non-empty string
-> Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts
Details:
* options.allowedHosts should be an array:
[non-empty string, ...] (should not have fewer than 1 item)
* options.allowedHosts should be one of these:
\\"auto\\" | \\"all\\"
* options.allowedHosts should be a non-empty string."
`;
exports[`options validate should throw an error on the "allowedHosts" option with 'true' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.allowedHosts should be one of these:
[non-empty string, ...] (should not have fewer than 1 item) | \\"auto\\" | \\"all\\" | non-empty string
-> Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts
Details:
* options.allowedHosts should be an array:
[non-empty string, ...] (should not have fewer than 1 item)
* options.allowedHosts should be one of these:
\\"auto\\" | \\"all\\"
* options.allowedHosts should be a non-empty string."
`;
exports[`options validate should throw an error on the "bonjour" option with '' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.bonjour should be one of these:
boolean | object { … }
-> Allows to broadcasts dev server via ZeroConf networking on start. https://webpack.js.org/configuration/dev-server/#devserverbonjour
Details:
* options.bonjour should be a boolean.
* options.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 '{"hotEntry":[""]}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.client.hotEntry should be one of these:
boolean | function
-> Injects a Hot Module Replacement entry.
Details:
* options.client.hotEntry should be a boolean.
* options.client.hotEntry should be an instance of function."
`;
exports[`options validate should throw an error on the "client" option with '{"logging":"silent"}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.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 options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.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 options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.client.needClientEntry should be one of these:
boolean | function
-> Inject a client entry.
Details:
* options.client.needClientEntry should be a boolean.
* options.client.needClientEntry should be an instance of function."
`;
exports[`options validate should throw an error on the "client" option with '{"overlay":""}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.client.overlay should be one of these:
boolean | object { errors?, warnings? }
Details:
* options.client.overlay should be a boolean.
-> Enables a full-screen overlay in the browser when there are compiler errors or warnings.
* options.client.overlay should be an object:
object { errors?, warnings? }"
`;
exports[`options validate should throw an error on the "client" option with '{"overlay":{"arbitrary":""}}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.client.overlay has an unknown property 'arbitrary'. These properties are valid:
object { errors?, warnings? }"
`;
exports[`options validate should throw an error on the "client" option with '{"overlay":{"errors":""}}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.client.overlay.errors should be a boolean.
-> Enables 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 options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.client.overlay.warnings should be a boolean.
-> Enables a full-screen overlay in the browser when there are compiler warnings."
`;
exports[`options validate should throw an error on the "client" option with '{"progress":""}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.client.progress should be a boolean.
-> Prints compilation progress in percentage in the browser."
`;
exports[`options validate should throw an error on the "client" option with '{"transport":true}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.client.transport should be one of these:
\\"sockjs\\" | \\"ws\\" | non-empty string
-> Allows to set custom transport to communicate with dev server.
Details:
* options.client.transport should be one of these:
\\"sockjs\\" | \\"ws\\"
* options.client.transport should be a non-empty string."
`;
exports[`options validate should throw an error on the "client" option with '{"unknownOption":true}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.client has an unknown property 'unknownOption'. These properties are valid:
object { hotEntry?, logging?, needClientEntry?, overlay?, progress?, transport?, webSocketURL? }
-> Allows to specify options for client script in the browser. https://webpack.js.org/configuration/dev-server/#devserverclient"
`;
exports[`options validate should throw an error on the "client" option with '{"webSocketURL":{"hostname":""}}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.client.webSocketURL.hostname should be an non-empty string.
-> Tells clients connected to devServer to use the provided hostname."
`;
exports[`options validate should throw an error on the "client" option with '{"webSocketURL":{"hostname":true,"pathname":"","port":8080}}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.client.webSocketURL.hostname should be a non-empty string.
-> Tells clients connected to devServer to use the provided hostname."
`;
exports[`options validate should throw an error on the "client" option with '{"webSocketURL":{"pathname":true}}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.client.webSocketURL.pathname 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 '{"webSocketURL":{"port":""}}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.client.webSocketURL.port should be an non-empty string."
`;
exports[`options validate should throw an error on the "client" option with '{"webSocketURL":{"port":true}}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.client.webSocketURL should be one of these:
non-empty string | object { hostname?, pathname?, password?, port?, protocol?, username? }
-> Allows to specify URL to web socket server (useful when you're proxying dev server and client script does not always know where to connect to).
Details:
* options.client.webSocketURL.port should be one of these:
number | non-empty string
-> Tells clients connected to devServer to use the provided port.
Details:
* options.client.webSocketURL.port should be a number.
* options.client.webSocketURL.port should be a non-empty string."
`;
exports[`options validate should throw an error on the "client" option with '{"webSocketURL":{"username":123,"password":976}}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.client.webSocketURL should be one of these:
non-empty string | object { hostname?, pathname?, password?, port?, protocol?, username? }
-> Allows to specify URL to web socket server (useful when you're proxying dev server and client script does not always know where to connect to).
Details:
* options.client.webSocketURL.password should be a string.
-> Tells clients connected to devServer to use the provided password to authenticate.
* options.client.webSocketURL.username should be a string.
-> Tells clients connected to devServer to use the provided username to authenticate."
`;
exports[`options validate should throw an error on the "client" option with 'whoops!' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.client should be an object:
object { hotEntry?, logging?, needClientEntry?, overlay?, progress?, transport?, webSocketURL? }
-> Allows to specify options for client script in the browser. https://webpack.js.org/configuration/dev-server/#devserverclient"
`;
exports[`options validate should throw an error on the "compress" option with '' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.compress should be a boolean.
-> Enables 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 options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.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 "headers" option with '1' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.headers should be one of these:
object { … } | function
-> Allows to set custom headers on response. https://webpack.js.org/configuration/dev-server/#devserverheaders
Details:
* options.headers should be an object:
object { … }
* options.headers should be an instance of function."
`;
exports[`options validate should throw an error on the "headers" option with 'false' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.headers should be one of these:
object { … } | function
-> Allows to set custom headers on response. https://webpack.js.org/configuration/dev-server/#devserverheaders
Details:
* options.headers should be an object:
object { … }
* options.headers should be an instance of function."
`;
exports[`options validate should throw an error on the "historyApiFallback" option with '' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.historyApiFallback should be one of these:
boolean | object { … }
-> Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallback
Details:
* options.historyApiFallback should be a boolean.
* options.historyApiFallback should be an object:
object { … }
-> Options for \`historyApiFallback\`, description available at https://github.com/bripkens/connect-history-api-fallback#options"
`;
exports[`options validate should throw an error on the "host" option with '' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.host should be an non-empty string.
-> Allows to specify a hostname to use. https://webpack.js.org/configuration/dev-server/#devserverhost"
`;
exports[`options validate should throw an error on the "host" option with 'false' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.host should be a non-empty string.
-> Allows to specify a hostname to use. https://webpack.js.org/configuration/dev-server/#devserverhost"
`;
exports[`options validate should throw an error on the "host" option with 'null' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.host should be a non-empty string.
-> Allows to specify a hostname to use. https://webpack.js.org/configuration/dev-server/#devserverhost"
`;
exports[`options validate should throw an error on the "hot" option with '' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.hot should be one of these:
boolean | \\"only\\"
-> Enables Hot Module Replacement. https://webpack.js.org/configuration/dev-server/#devserverhot
Details:
* options.hot should be a boolean.
* options.hot should be \\"only\\"."
`;
exports[`options validate should throw an error on the "hot" option with 'foo' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.hot should be one of these:
boolean | \\"only\\"
-> Enables Hot Module Replacement. https://webpack.js.org/configuration/dev-server/#devserverhot
Details:
* options.hot should be a boolean.
* options.hot should be \\"only\\"."
`;
exports[`options validate should throw an error on the "http2" option with '' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.http2 should be a boolean.
-> Allows to 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 options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.https should be one of these:
boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? }
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps
Details:
* options.https should be a boolean.
* options.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 options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.https should be one of these:
boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? }
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps
Details:
* options.https.cacert should be one of these:
string | Buffer
-> Path to an SSL CA certificate.
Details:
* options.https.cacert should be a string.
* options.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 options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.https should be one of these:
boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? }
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps
Details:
* options.https.cert should be one of these:
string | Buffer
-> Path to an SSL certificate.
Details:
* options.https.cert should be a string.
* options.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 options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.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 options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.https should be one of these:
boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? }
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps
Details:
* options.https.key should be one of these:
string | Buffer
-> Path to an SSL key.
Details:
* options.https.key should be a string.
* options.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 options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.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 options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.https should be one of these:
boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? }
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps
Details:
* options.https.pfx should be one of these:
string | Buffer
-> Path to an SSL pfx file.
Details:
* options.https.pfx should be a string.
* options.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 options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.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 options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.onAfterSetupMiddleware should be an instance of function.
-> Provides the ability to execute a custom function and apply custom middleware(s) after all other middlewares. https://webpack.js.org/configuration/dev-server/#devserveronaftersetupmiddleware"
`;
exports[`options validate should throw an error on the "onBeforeSetupMiddleware" option with 'false' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.onBeforeSetupMiddleware should be an instance of function.
-> Provides the ability to execute a custom function and apply custom middleware(s) prior to all other middlewares. https://webpack.js.org/configuration/dev-server/#devserveronbeforesetupmiddleware"
`;
exports[`options validate should throw an error on the "onListening" option with '' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.onListening should be an instance of function.
-> Provides the ability to execute a custom function when dev server starts listening. https://webpack.js.org/configuration/dev-server/#devserveronlistening"
`;
exports[`options validate should throw an error on the "open" option with '' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.open should be an non-empty string."
`;
exports[`options validate should throw an error on the "open" option with '{"app":true}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.open should be one of these:
[non-empty string | object { target?, app? }, ...] | boolean | non-empty string | object { target?, app? }
-> Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen
Details:
* options.open.app should be one of these:
object { name?, arguments? } | non-empty string
-> Open specified browser.
Details:
* options.open.app should be an object:
object { name?, arguments? }
* options.open.app should be a non-empty string."
`;
exports[`options validate should throw an error on the "open" option with '{"foo":"bar"}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.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 options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.open should be one of these:
[non-empty string | object { target?, app? }, ...] | boolean | non-empty string | object { target?, app? }
-> Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen
Details:
* options.open.target should be one of these:
[string, ...] | boolean | string
-> Opens specified page in browser.
Details:
* options.open.target should be an array:
[string, ...]
* options.open.target should be a boolean.
* options.open.target should be a string."
`;
exports[`options validate should throw an error on the "port" option with '' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.port should be an non-empty string."
`;
exports[`options validate should throw an error on the "port" option with 'false' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.port should be one of these:
number | non-empty string | \\"auto\\"
-> Allows to specify a port to use. https://webpack.js.org/configuration/dev-server/#devserverport
Details:
* options.port should be a number.
* options.port should be a non-empty string.
* options.port should be \\"auto\\"."
`;
exports[`options validate should throw an error on the "port" option with 'null' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.port should be one of these:
number | non-empty string | \\"auto\\"
-> Allows to specify a port to use. https://webpack.js.org/configuration/dev-server/#devserverport
Details:
* options.port should be a number.
* options.port should be a non-empty string.
* options.port should be \\"auto\\"."
`;
exports[`options validate should throw an error on the "proxy" option with 'false' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.proxy should be one of these:
object { … } | [object { … } | function, ...]
-> Allows to proxy requests, 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:
* options.proxy should be an object:
object { … }
* options.proxy should be an array:
[object { … } | function, ...]"
`;
exports[`options validate should throw an error on the "proxy" option with 'function () {}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.proxy should be one of these:
object { … } | [object { … } | function, ...]
-> Allows to proxy requests, 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:
* options.proxy should be an object:
object { … }
* options.proxy should be an array:
[object { … } | function, ...]"
`;
exports[`options validate should throw an error on the "static" option with '' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.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 options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.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 options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.static should be one of these:
[non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] | boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }
-> Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic
Details:
* options.static.publicPath should be one of these:
[string, ...] (should not have fewer than 1 item) | string
-> The static files will be available in the browser under this public path.
Details:
* options.static.publicPath should be an array:
[string, ...] (should not have fewer than 1 item)
* options.static.publicPath should be a string."
`;
exports[`options validate should throw an error on the "static" option with '{"serveIndex":"true"}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.static should be one of these:
[non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] | boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }
-> Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic
Details:
* options.static.serveIndex should be one of these:
boolean | object { … }
-> Tells dev server to use serveIndex middleware when enabled.
Details:
* options.static.serveIndex should be a boolean.
* options.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 options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.static should be one of these:
[non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] | boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }
-> Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic
Details:
* options.static.watch should be one of these:
boolean | object { … }
-> Watches for files in static content directory.
Details:
* options.static.watch should be a boolean.
* options.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 options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.static should be one of these:
[non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] | boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }
-> Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic
Details:
* options.static should be an array:
[non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...]
* options.static should be a boolean.
* options.static should be a non-empty string.
* options.static should be an object:
object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }"
`;
exports[`options validate should throw an error on the "static" option with 'null' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.static should be one of these:
[non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] | boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }
-> Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic
Details:
* options.static should be an array:
[non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...]
* options.static should be a boolean.
* options.static should be a non-empty string.
* options.static should be an object:
object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }"
`;
exports[`options validate should throw an error on the "watchFiles" option with '123' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.watchFiles should be one of these:
[non-empty string | object { paths?, options? }, ...] | non-empty string | object { paths?, options? }
-> Allows to configure list of globs/directories/files to watch for file changes. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles
Details:
* options.watchFiles should be an array:
[non-empty string | object { paths?, options? }, ...]
* options.watchFiles should be a non-empty string.
* options.watchFiles should be an object:
object { paths?, options? }"
`;
exports[`options validate should throw an error on the "watchFiles" option with 'false' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.watchFiles should be one of these:
[non-empty string | object { paths?, options? }, ...] | non-empty string | object { paths?, options? }
-> Allows to configure list of globs/directories/files to watch for file changes. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles
Details:
* options.watchFiles should be an array:
[non-empty string | object { paths?, options? }, ...]
* options.watchFiles should be a non-empty string.
* options.watchFiles should be an object:
object { paths?, options? }"
`;
exports[`options validate should throw an error on the "webSocketServer" option with '{"notAnOption":true}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.webSocketServer has an unknown property 'notAnOption'. These properties are valid:
object { type?, options? }"
`;
exports[`options validate should throw an error on the "webSocketServer" option with '{"type":true}' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.webSocketServer should be one of these:
\\"sockjs\\" | \\"ws\\" | non-empty string | function | object { type?, options? }
-> Allows to set web socket server and options (by default 'ws'). https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver
Details:
* options.webSocketServer.type should be one of these:
\\"sockjs\\" | \\"ws\\" | non-empty string | function
Details:
* options.webSocketServer.type should be one of these:
\\"sockjs\\" | \\"ws\\"
* options.webSocketServer.type should be a non-empty string.
* options.webSocketServer.type should be an instance of function."
`;
exports[`options validate should throw an error on the "webSocketServer" option with 'false' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.webSocketServer should be one of these:
\\"sockjs\\" | \\"ws\\" | non-empty string | function | object { type?, options? }
-> Allows to set web socket server and options (by default 'ws'). https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver
Details:
* options.webSocketServer should be one of these:
\\"sockjs\\" | \\"ws\\"
* options.webSocketServer should be a non-empty string.
* options.webSocketServer should be an instance of function.
* options.webSocketServer should be an object:
object { type?, options? }"
`;
exports[`options validate should throw an error on the "webSocketServer" option with 'null' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.webSocketServer should be one of these:
\\"sockjs\\" | \\"ws\\" | non-empty string | function | object { type?, options? }
-> Allows to set web socket server and options (by default 'ws'). https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver
Details:
* options.webSocketServer should be one of these:
\\"sockjs\\" | \\"ws\\"
* options.webSocketServer should be a non-empty string.
* options.webSocketServer should be an instance of function.
* options.webSocketServer should be an object:
object { type?, options? }"
`;