-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
Copy pathvalidate-options.test.js.snap.webpack4
792 lines (718 loc) · 45.9 KB
/
validate-options.test.js.snap.webpack4
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
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
// 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 a 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 a 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').
-> Read more at 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').
-> Read more at 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').
-> Read more at 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.
-> Read more at 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.
-> Read more at https://github.com/watson/bonjour#initializing"
`;
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\\"
-> Read more at https://webpack.js.org/configuration/dev-server/#logging"
`;
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\\"
-> Read more at https://webpack.js.org/configuration/dev-server/#logging"
`;
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 should be one of these:
false | object { logging?, overlay?, progress?, webSocketTransport?, webSocketURL? }
-> Allows to specify options for client script in the browser or disable client script.
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverclient
Details:
* 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.
-> Read more at https://webpack.js.org/configuration/dev-server/#overlay
* 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.
-> Read more at https://webpack.js.org/configuration/dev-server/#progress"
`;
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 { logging?, overlay?, progress?, webSocketTransport?, webSocketURL? }"
`;
exports[`options validate should throw an error on the "client" option with '{"webSocketTransport":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 should be one of these:
false | object { logging?, overlay?, progress?, webSocketTransport?, webSocketURL? }
-> Allows to specify options for client script in the browser or disable client script.
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverclient
Details:
* options.client.webSocketTransport should be one of these:
\\"sockjs\\" | \\"ws\\" | non-empty string
-> Allows to set custom web socket transport to communicate with dev server.
-> Read more at https://webpack.js.org/configuration/dev-server/#websockettransport
Details:
* options.client.webSocketTransport should be one of these:
\\"sockjs\\" | \\"ws\\"
* options.client.webSocketTransport should be a non-empty string."
`;
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 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":{"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 a 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 should be one of these:
false | object { logging?, overlay?, progress?, webSocketTransport?, webSocketURL? }
-> Allows to specify options for client script in the browser or disable client script.
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverclient
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 should be one of these:
false | object { logging?, overlay?, progress?, webSocketTransport?, webSocketURL? }
-> Allows to specify options for client script in the browser or disable client script.
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverclient
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 one of these:
false | object { logging?, overlay?, progress?, webSocketTransport?, webSocketURL? }
-> Allows to specify options for client script in the browser or disable client script.
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverclient
Details:
* options.client should be false.
* options.client should be an object:
object { logging?, overlay?, progress?, webSocketTransport?, webSocketURL? }"
`;
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.
-> Read more at 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.
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverdevmiddleware"
`;
exports[`options validate should throw an error on the "headers" 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.headers should be a non-empty array."
`;
exports[`options validate should throw an error on the "headers" 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.headers[0] has an unknown property 'foo'. These properties are valid:
object { key?, value? }"
`;
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 { key?, value? }, ...] (should not have fewer than 1 item) | object { … } | function
-> Allows to set custom headers on response.
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverheaders
Details:
* options.headers should be an array:
[object { key?, value? }, ...] (should not have fewer than 1 item)
* 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 { key?, value? }, ...] (should not have fewer than 1 item) | object { … } | function
-> Allows to set custom headers on response.
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverheaders
Details:
* options.headers should be an array:
[object { key?, value? }, ...] (should not have fewer than 1 item)
* 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.
-> Read more at 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\`.
-> Read more 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 a non-empty string."
`;
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 one of these:
\\"local-ip\\" | \\"local-ipv4\\" | \\"local-ipv6\\" | non-empty string
-> Allows to specify a hostname to use.
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverhost
Details:
* options.host should be one of these:
\\"local-ip\\" | \\"local-ipv4\\" | \\"local-ipv6\\"
* options.host should be a non-empty string."
`;
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 one of these:
\\"local-ip\\" | \\"local-ipv4\\" | \\"local-ipv6\\" | non-empty string
-> Allows to specify a hostname to use.
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverhost
Details:
* options.host should be one of these:
\\"local-ip\\" | \\"local-ipv4\\" | \\"local-ipv6\\"
* options.host should be a non-empty string."
`;
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.
-> Read more at 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.
-> Read more at 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.
-> Read more at 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?, ca?, cacert?, cert?, crl?, key?, pfx?, … }
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps
Details:
* options.https should be a boolean.
* options.https should be an object:
object { passphrase?, requestCert?, ca?, cacert?, cert?, crl?, key?, pfx?, … }"
`;
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?, ca?, cacert?, cert?, crl?, key?, pfx?, … }
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps
Details:
* options.https.cacert should be one of these:
[string | Buffer, ...] | string | Buffer
-> Path to an SSL CA certificate or content of an SSL CA certificate.
Details:
* options.https.cacert should be an array:
[string | Buffer, ...]
* 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?, ca?, cacert?, cert?, crl?, key?, pfx?, … }
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps
Details:
* options.https.cert should be one of these:
[string | Buffer, ...] | string | Buffer
-> Path to an SSL certificate or content of an SSL certificate.
Details:
* options.https.cert should be an array:
[string | Buffer, ...]
* 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 '{"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?, ca?, cacert?, cert?, crl?, key?, pfx?, … }
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps
Details:
* options.https.key should be one of these:
[string | Buffer | object { … }, ...] | string | Buffer
-> Path to an SSL key or content of an SSL key.
Details:
* options.https.key should be an array:
[string | Buffer | object { … }, ...]
* 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?, ca?, cacert?, cert?, crl?, key?, pfx?, … }
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps
Details:
* options.https.pfx should be one of these:
[string | Buffer | object { … }, ...] | string | Buffer
-> Path to an SSL pfx file or content of an SSL pfx file.
Details:
* options.https.pfx should be an array:
[string | Buffer | object { … }, ...]
* 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 "ipc" 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.ipc should be one of these:
non-empty string | true
-> Listen to a unix socket.
-> Read more at https://webpack.js.org/configuration/dev-server/#devserveripc
Details:
* options.ipc should be a non-empty string.
* options.ipc should be a true.
* options.ipc should be true."
`;
exports[`options validate should throw an error on the "ipc" 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.ipc should be one of these:
non-empty string | true
-> Listen to a unix socket.
-> Read more at https://webpack.js.org/configuration/dev-server/#devserveripc
Details:
* options.ipc should be a non-empty string.
* options.ipc should be true."
`;
exports[`options validate should throw an error on the "liveReload" option with 'invalid' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.liveReload should be a boolean.
-> Enables reload/refresh the page(s) when file changes are detected (enabled by default).
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverlivereload"
`;
exports[`options validate should throw an error on the "magicHtml" option with 'string' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.magicHtml should be a boolean.
-> Tells dev-server whether to enable magic HTML routes (routes corresponding to your webpack output, for example '/main' for 'main.js').
-> Read more at https://webpack.js.org/configuration/dev-server/#devservermagichtml"
`;
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.
-> Read more at 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.
-> Read more at 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.
-> Read more at 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 a 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).
-> Read more at 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).
-> Read more at https://webpack.js.org/configuration/dev-server/#devserveropen
Details:
* options.open.target should be one of these:
[string, ...] | string
-> Opens specified page in browser.
Details:
* options.open.target should be an array:
[string, ...]
* 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 a non-empty string."
`;
exports[`options validate should throw an error on the "port" 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.port should be >= 0 and <= 65535."
`;
exports[`options validate should throw an error on the "port" option with '65536' 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 >= 0 and <= 65535."
`;
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 (should be >= 0 and <= 65535) | non-empty string | \\"auto\\"
-> Allows to specify a port to use.
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverport
Details:
* options.port should be a number (should be >= 0 and <= 65535).
* 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 (should be >= 0 and <= 65535) | non-empty string | \\"auto\\"
-> Allows to specify a port to use.
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverport
Details:
* options.port should be a number (should be >= 0 and <= 65535).
* 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 '() => {}' 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.
-> Read more at 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 '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.
-> Read more at 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 a 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.
-> Read more at https://webpack.js.org/configuration/dev-server/#directory"
`;
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).
-> Read more at 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.
-> Read more at https://webpack.js.org/configuration/dev-server/#publicpath
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).
-> Read more at 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.
-> Read more at https://webpack.js.org/configuration/dev-server/#serveindex
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).
-> Read more at 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.
-> Read more at https://webpack.js.org/configuration/dev-server/#watch
Details:
* options.static.watch should be a boolean.
* options.static.watch should be an object:
object { … }
-> Options for watch.
-> Read more 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).
-> Read more at 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).
-> Read more at 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.
-> Read more at 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.
-> Read more at 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":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:
false | \\"sockjs\\" | \\"ws\\" | non-empty string | function | object { type?, options? }
-> Allows to set web socket server and options (by default 'ws').
-> Read more at 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 '{"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:
false | \\"sockjs\\" | \\"ws\\" | non-empty string | function | object { type?, options? }
-> Allows to set web socket server and options (by default 'ws').
-> Read more at 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 '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:
false | \\"sockjs\\" | \\"ws\\" | non-empty string | function | object { type?, options? }
-> Allows to set web socket server and options (by default 'ws').
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver
Details:
* options.webSocketServer should be one of these:
false | \\"sockjs\\" | \\"ws\\"
Details:
* options.webSocketServer should be false.
* 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 '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:
false | \\"sockjs\\" | \\"ws\\" | non-empty string | function | object { type?, options? }
-> Allows to set web socket server and options (by default 'ws').
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver
Details:
* options.webSocketServer should be one of these:
false | \\"sockjs\\" | \\"ws\\"
Details:
* options.webSocketServer should be false.
* 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? }"
`;