@@ -75,6 +75,63 @@ exports[`validation should throw an error on the "headers" option with "true" va
7575 * options.headers should be an instance of function."
7676`;
7777
78+ exports[`validation should throw an error on the "hot" option with "{"heartbeat":-1}" value 1`] = `
79+ "Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
80+ - options.hot.heartbeat should be >= 0.
81+ -> Heartbeat interval (in milliseconds) used to keep the SSE connection alive."
82+ `;
83+
84+ exports[`validation should throw an error on the "hot" option with "{"log":true}" value 1`] = `
85+ "Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
86+ - options.hot should be one of these:
87+ boolean | object { path?, heartbeat?, log?, statsOptions? }
88+ -> Enable hot module replacement via a Server-Sent Events endpoint.
89+ -> Read more at https://github.com/webpack/webpack-dev-middleware#hot
90+ Details:
91+ * options.hot.log should be one of these:
92+ false | function
93+ -> Logger used to print build status. Pass \`false\` to disable.
94+ Details:
95+ * options.hot.log should be false.
96+ * options.hot.log should be an instance of function."
97+ `;
98+
99+ exports[`validation should throw an error on the "hot" option with "{"path":""}" value 1`] = `
100+ "Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
101+ - options.hot.path should be a non-empty string.
102+ -> The path the SSE endpoint is served at."
103+ `;
104+
105+ exports[`validation should throw an error on the "hot" option with "{"unknown":true}" value 1`] = `
106+ "Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
107+ - options.hot has an unknown property 'unknown'. These properties are valid:
108+ object { path?, heartbeat?, log?, statsOptions? }"
109+ `;
110+
111+ exports[`validation should throw an error on the "hot" option with "0" value 1`] = `
112+ "Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
113+ - options.hot should be one of these:
114+ boolean | object { path?, heartbeat?, log?, statsOptions? }
115+ -> Enable hot module replacement via a Server-Sent Events endpoint.
116+ -> Read more at https://github.com/webpack/webpack-dev-middleware#hot
117+ Details:
118+ * options.hot should be a boolean.
119+ * options.hot should be an object:
120+ object { path?, heartbeat?, log?, statsOptions? }"
121+ `;
122+
123+ exports[`validation should throw an error on the "hot" option with "foo" value 1`] = `
124+ "Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
125+ - options.hot should be one of these:
126+ boolean | object { path?, heartbeat?, log?, statsOptions? }
127+ -> Enable hot module replacement via a Server-Sent Events endpoint.
128+ -> Read more at https://github.com/webpack/webpack-dev-middleware#hot
129+ Details:
130+ * options.hot should be a boolean.
131+ * options.hot should be an object:
132+ object { path?, heartbeat?, log?, statsOptions? }"
133+ `;
134+
78135exports[`validation should throw an error on the "index" option with "{}" value 1`] = `
79136"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
80137 - options.index should be one of these:
0 commit comments