@@ -608,6 +608,124 @@ exports[`options validate should throw an error on the "proxy" option with 'fals
608
608
[object { … } | function, ...]"
609
609
`;
610
610
611
+ exports[`options validate should throw an error on the "server" option with '{"type":"https","additional":"test"}' value 1`] = `
612
+ "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
613
+ - options.server has an unknown property 'additional'. These properties are valid:
614
+ object { type?, options? }"
615
+ `;
616
+
617
+ exports[`options validate should throw an error on the "server" option with '{"type":"https","options":{"ca":true}}' value 1`] = `
618
+ "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
619
+ - options.server should be one of these:
620
+ \\"http\\" | \\"https\\" | \\"spdy\\" | object { type?, options? }
621
+ -> Allows to set server and options (by default 'http').
622
+ -> Read more at https://webpack.js.org/configuration/dev-server/#devserverserver
623
+ Details:
624
+ * options.server.options.ca should be one of these:
625
+ [string | Buffer, ...] | string | Buffer
626
+ -> Path to an SSL CA certificate or content of an SSL CA certificate.
627
+ Details:
628
+ * options.server.options.ca should be an array:
629
+ [string | Buffer, ...]
630
+ * options.server.options.ca should be a string.
631
+ * options.server.options.ca should be an instance of Buffer."
632
+ `;
633
+
634
+ exports[`options validate should throw an error on the "server" option with '{"type":"https","options":{"cert":true}}' value 1`] = `
635
+ "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
636
+ - options.server should be one of these:
637
+ \\"http\\" | \\"https\\" | \\"spdy\\" | object { type?, options? }
638
+ -> Allows to set server and options (by default 'http').
639
+ -> Read more at https://webpack.js.org/configuration/dev-server/#devserverserver
640
+ Details:
641
+ * options.server.options.cert should be one of these:
642
+ [string | Buffer, ...] | string | Buffer
643
+ -> Path to an SSL certificate or content of an SSL certificate.
644
+ Details:
645
+ * options.server.options.cert should be an array:
646
+ [string | Buffer, ...]
647
+ * options.server.options.cert should be a string.
648
+ * options.server.options.cert should be an instance of Buffer."
649
+ `;
650
+
651
+ exports[`options validate should throw an error on the "server" option with '{"type":"https","options":{"key":10}}' value 1`] = `
652
+ "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
653
+ - options.server should be one of these:
654
+ \\"http\\" | \\"https\\" | \\"spdy\\" | object { type?, options? }
655
+ -> Allows to set server and options (by default 'http').
656
+ -> Read more at https://webpack.js.org/configuration/dev-server/#devserverserver
657
+ Details:
658
+ * options.server.options.key should be one of these:
659
+ [string | Buffer | object { … }, ...] | string | Buffer
660
+ -> Path to an SSL key or content of an SSL key.
661
+ Details:
662
+ * options.server.options.key should be an array:
663
+ [string | Buffer | object { … }, ...]
664
+ * options.server.options.key should be a string.
665
+ * options.server.options.key should be an instance of Buffer."
666
+ `;
667
+
668
+ exports[`options validate should throw an error on the "server" option with '{"type":"https","options":{"passphrase":false}}' value 1`] = `
669
+ "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
670
+ - options.server.options.passphrase should be a string.
671
+ -> Passphrase for a pfx file."
672
+ `;
673
+
674
+ exports[`options validate should throw an error on the "server" option with '{"type":"https","options":{"pfx":10}}' value 1`] = `
675
+ "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
676
+ - options.server should be one of these:
677
+ \\"http\\" | \\"https\\" | \\"spdy\\" | object { type?, options? }
678
+ -> Allows to set server and options (by default 'http').
679
+ -> Read more at https://webpack.js.org/configuration/dev-server/#devserverserver
680
+ Details:
681
+ * options.server.options.pfx should be one of these:
682
+ [string | Buffer | object { … }, ...] | string | Buffer
683
+ -> Path to an SSL pfx file or content of an SSL pfx file.
684
+ Details:
685
+ * options.server.options.pfx should be an array:
686
+ [string | Buffer | object { … }, ...]
687
+ * options.server.options.pfx should be a string.
688
+ * options.server.options.pfx should be an instance of Buffer."
689
+ `;
690
+
691
+ exports[`options validate should throw an error on the "server" option with '{"type":"https","options":{"requestCert":"false"}}' value 1`] = `
692
+ "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
693
+ - options.server.options.requestCert should be a boolean.
694
+ -> Request for an SSL certificate."
695
+ `;
696
+
697
+ exports[`options validate should throw an error on the "server" option with '{"type":"invalid"}' value 1`] = `
698
+ "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
699
+ - options.server.type should be one of these:
700
+ \\"http\\" | \\"https\\" | \\"spdy\\""
701
+ `;
702
+
703
+ exports[`options validate should throw an error on the "server" option with 'http2' value 1`] = `
704
+ "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
705
+ - options.server should be one of these:
706
+ \\"http\\" | \\"https\\" | \\"spdy\\" | object { type?, options? }
707
+ -> Allows to set server and options (by default 'http').
708
+ -> Read more at https://webpack.js.org/configuration/dev-server/#devserverserver
709
+ Details:
710
+ * options.server should be one of these:
711
+ \\"http\\" | \\"https\\" | \\"spdy\\"
712
+ * options.server should be an object:
713
+ object { type?, options? }"
714
+ `;
715
+
716
+ exports[`options validate should throw an error on the "server" option with 'invalid' value 1`] = `
717
+ "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
718
+ - options.server should be one of these:
719
+ \\"http\\" | \\"https\\" | \\"spdy\\" | object { type?, options? }
720
+ -> Allows to set server and options (by default 'http').
721
+ -> Read more at https://webpack.js.org/configuration/dev-server/#devserverserver
722
+ Details:
723
+ * options.server should be one of these:
724
+ \\"http\\" | \\"https\\" | \\"spdy\\"
725
+ * options.server should be an object:
726
+ object { type?, options? }"
727
+ `;
728
+
611
729
exports[`options validate should throw an error on the "static" option with '' value 1`] = `
612
730
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
613
731
- options.static should be a non-empty string."
0 commit comments