Skip to content

Commit 9ef0fa8

Browse files
committed
test: updates
1 parent 97ce0f0 commit 9ef0fa8

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

test/__snapshots__/validate-options.test.js.snap.webpack4

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,25 +414,30 @@ exports[`options validate should throw an error on the "open" option with '{"tar
414414
* configuration.open.target should be a non-empty string."
415415
`;
416416

417+
exports[`options validate should throw an error on the "port" option with '' value 1`] = `
418+
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
419+
- configuration.port should be an non-empty string."
420+
`;
421+
417422
exports[`options validate should throw an error on the "port" option with 'false' value 1`] = `
418423
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
419424
- configuration.port should be one of these:
420-
number | string | \\"auto\\"
425+
number | non-empty string | \\"auto\\"
421426
-> Specify a port number to listen for requests on. https://webpack.js.org/configuration/dev-server/#devserverport
422427
Details:
423428
* configuration.port should be a number.
424-
* configuration.port should be a string.
429+
* configuration.port should be a non-empty string.
425430
* configuration.port should be \\"auto\\"."
426431
`;
427432

428433
exports[`options validate should throw an error on the "port" option with 'null' value 1`] = `
429434
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
430435
- configuration.port should be one of these:
431-
number | string | \\"auto\\"
436+
number | non-empty string | \\"auto\\"
432437
-> Specify a port number to listen for requests on. https://webpack.js.org/configuration/dev-server/#devserverport
433438
Details:
434439
* configuration.port should be a number.
435-
* configuration.port should be a string.
440+
* configuration.port should be a non-empty string.
436441
* configuration.port should be \\"auto\\"."
437442
`;
438443

test/__snapshots__/validate-options.test.js.snap.webpack5

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,25 +414,30 @@ exports[`options validate should throw an error on the "open" option with '{"tar
414414
* configuration.open.target should be a non-empty string."
415415
`;
416416

417+
exports[`options validate should throw an error on the "port" option with '' value 1`] = `
418+
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
419+
- configuration.port should be an non-empty string."
420+
`;
421+
417422
exports[`options validate should throw an error on the "port" option with 'false' value 1`] = `
418423
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
419424
- configuration.port should be one of these:
420-
number | string | \\"auto\\"
425+
number | non-empty string | \\"auto\\"
421426
-> Specify a port number to listen for requests on. https://webpack.js.org/configuration/dev-server/#devserverport
422427
Details:
423428
* configuration.port should be a number.
424-
* configuration.port should be a string.
429+
* configuration.port should be a non-empty string.
425430
* configuration.port should be \\"auto\\"."
426431
`;
427432

428433
exports[`options validate should throw an error on the "port" option with 'null' value 1`] = `
429434
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
430435
- configuration.port should be one of these:
431-
number | string | \\"auto\\"
436+
number | non-empty string | \\"auto\\"
432437
-> Specify a port number to listen for requests on. https://webpack.js.org/configuration/dev-server/#devserverport
433438
Details:
434439
* configuration.port should be a number.
435-
* configuration.port should be a string.
440+
* configuration.port should be a non-empty string.
436441
* configuration.port should be \\"auto\\"."
437442
`;
438443

0 commit comments

Comments
 (0)