You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/__snapshots__/validate-options.test.js.snap.webpack4
+61
Original file line number
Diff line number
Diff line change
@@ -215,12 +215,43 @@ exports[`options validate should throw an error on the "open" option with '[]' v
215
215
- configuration.open should be an non-empty array."
216
216
`;
217
217
218
+
exports[`options validate should throw an error on the "open" option with '{"app":true}' value 1`] = `
219
+
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
220
+
- configuration.open should be one of these:
221
+
boolean | non-empty string | object { target?, app? } | [non-empty string | object { target?, app? }, ...] (should not have fewer than 1 item)
222
+
-> Tells dev-server to open the browser after server had been started. Set it to true to open your default browser. https://webpack.js.org/configuration/dev-server/#devserveropen
223
+
Details:
224
+
* configuration.open.app should be one of these:
225
+
non-empty string | [non-empty string, ...] (should not have fewer than 1 item)
226
+
-> Open specified browser.
227
+
Details:
228
+
* configuration.open.app should be a non-empty string.
229
+
* configuration.open.app should be an array:
230
+
[non-empty string, ...] (should not have fewer than 1 item)"
231
+
`;
232
+
218
233
exports[`options validate should throw an error on the "open" option with '{"foo":"bar"}' value 1`] = `
219
234
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
220
235
- configuration.open has an unknown property 'foo'. These properties are valid:
221
236
object { target?, app? }"
222
237
`;
223
238
239
+
exports[`options validate should throw an error on the "open" option with '{"target":90}' value 1`] = `
240
+
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
241
+
- configuration.open should be one of these:
242
+
boolean | non-empty string | object { target?, app? } | [non-empty string | object { target?, app? }, ...] (should not have fewer than 1 item)
243
+
-> Tells dev-server to open the browser after server had been started. Set it to true to open your default browser. https://webpack.js.org/configuration/dev-server/#devserveropen
244
+
Details:
245
+
* configuration.open.target should be one of these:
246
+
boolean | non-empty string | [non-empty string, ...] (should not have fewer than 1 item)
247
+
-> Open specified route in browser.
248
+
Details:
249
+
* configuration.open.target should be a boolean.
250
+
* configuration.open.target should be a non-empty string.
251
+
* configuration.open.target should be an array:
252
+
[non-empty string, ...] (should not have fewer than 1 item)"
253
+
`;
254
+
224
255
exports[`options validate should throw an error on the "port" option with 'false' value 1`] = `
225
256
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
226
257
- configuration.port should be one of these:
@@ -272,6 +303,36 @@ exports[`options validate should throw an error on the "static" option with '' v
272
303
- configuration.static should be an non-empty string."
273
304
`;
274
305
306
+
exports[`options validate should throw an error on the "static" option with '{"publicPath":false}' value 1`] = `
307
+
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
-> It is possible to configure advanced options for serving static files from directory. See the Express documentation for the possible options. https://webpack.js.org/configuration/dev-server/#devserverstatic
311
+
Details:
312
+
* configuration.static.publicPath should be one of these:
313
+
non-empty string | [non-empty string, ...] (should not have fewer than 1 item)
314
+
-> The bundled files will be available in the browser under this path.
315
+
Details:
316
+
* configuration.static.publicPath should be a non-empty string.
317
+
* configuration.static.publicPath should be an array:
318
+
[non-empty string, ...] (should not have fewer than 1 item)"
319
+
`;
320
+
321
+
exports[`options validate should throw an error on the "static" option with '{"serveIndex":"true"}' value 1`] = `
322
+
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
-> It is possible to configure advanced options for serving static files from directory. See the Express documentation for the possible options. https://webpack.js.org/configuration/dev-server/#devserverstatic
326
+
Details:
327
+
* configuration.static.serveIndex should be one of these:
328
+
boolean | object { … }
329
+
-> Tells dev-server to use serveIndex middleware when enabled.
330
+
Details:
331
+
* configuration.static.serveIndex should be a boolean.
332
+
* configuration.static.serveIndex should be an object:
333
+
object { … }"
334
+
`;
335
+
275
336
exports[`options validate should throw an error on the "static" option with '0' value 1`] = `
276
337
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
Copy file name to clipboardExpand all lines: test/__snapshots__/validate-options.test.js.snap.webpack5
+61
Original file line number
Diff line number
Diff line change
@@ -215,12 +215,43 @@ exports[`options validate should throw an error on the "open" option with '[]' v
215
215
- configuration.open should be an non-empty array."
216
216
`;
217
217
218
+
exports[`options validate should throw an error on the "open" option with '{"app":true}' value 1`] = `
219
+
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
220
+
- configuration.open should be one of these:
221
+
boolean | non-empty string | object { target?, app? } | [non-empty string | object { target?, app? }, ...] (should not have fewer than 1 item)
222
+
-> Tells dev-server to open the browser after server had been started. Set it to true to open your default browser. https://webpack.js.org/configuration/dev-server/#devserveropen
223
+
Details:
224
+
* configuration.open.app should be one of these:
225
+
non-empty string | [non-empty string, ...] (should not have fewer than 1 item)
226
+
-> Open specified browser.
227
+
Details:
228
+
* configuration.open.app should be a non-empty string.
229
+
* configuration.open.app should be an array:
230
+
[non-empty string, ...] (should not have fewer than 1 item)"
231
+
`;
232
+
218
233
exports[`options validate should throw an error on the "open" option with '{"foo":"bar"}' value 1`] = `
219
234
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
220
235
- configuration.open has an unknown property 'foo'. These properties are valid:
221
236
object { target?, app? }"
222
237
`;
223
238
239
+
exports[`options validate should throw an error on the "open" option with '{"target":90}' value 1`] = `
240
+
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
241
+
- configuration.open should be one of these:
242
+
boolean | non-empty string | object { target?, app? } | [non-empty string | object { target?, app? }, ...] (should not have fewer than 1 item)
243
+
-> Tells dev-server to open the browser after server had been started. Set it to true to open your default browser. https://webpack.js.org/configuration/dev-server/#devserveropen
244
+
Details:
245
+
* configuration.open.target should be one of these:
246
+
boolean | non-empty string | [non-empty string, ...] (should not have fewer than 1 item)
247
+
-> Open specified route in browser.
248
+
Details:
249
+
* configuration.open.target should be a boolean.
250
+
* configuration.open.target should be a non-empty string.
251
+
* configuration.open.target should be an array:
252
+
[non-empty string, ...] (should not have fewer than 1 item)"
253
+
`;
254
+
224
255
exports[`options validate should throw an error on the "port" option with 'false' value 1`] = `
225
256
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
226
257
- configuration.port should be one of these:
@@ -272,6 +303,36 @@ exports[`options validate should throw an error on the "static" option with '' v
272
303
- configuration.static should be an non-empty string."
273
304
`;
274
305
306
+
exports[`options validate should throw an error on the "static" option with '{"publicPath":false}' value 1`] = `
307
+
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
-> It is possible to configure advanced options for serving static files from directory. See the Express documentation for the possible options. https://webpack.js.org/configuration/dev-server/#devserverstatic
311
+
Details:
312
+
* configuration.static.publicPath should be one of these:
313
+
non-empty string | [non-empty string, ...] (should not have fewer than 1 item)
314
+
-> The bundled files will be available in the browser under this path.
315
+
Details:
316
+
* configuration.static.publicPath should be a non-empty string.
317
+
* configuration.static.publicPath should be an array:
318
+
[non-empty string, ...] (should not have fewer than 1 item)"
319
+
`;
320
+
321
+
exports[`options validate should throw an error on the "static" option with '{"serveIndex":"true"}' value 1`] = `
322
+
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
-> It is possible to configure advanced options for serving static files from directory. See the Express documentation for the possible options. https://webpack.js.org/configuration/dev-server/#devserverstatic
326
+
Details:
327
+
* configuration.static.serveIndex should be one of these:
328
+
boolean | object { … }
329
+
-> Tells dev-server to use serveIndex middleware when enabled.
330
+
Details:
331
+
* configuration.static.serveIndex should be a boolean.
332
+
* configuration.static.serveIndex should be an object:
333
+
object { … }"
334
+
`;
335
+
275
336
exports[`options validate should throw an error on the "static" option with '0' value 1`] = `
276
337
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
0 commit comments