Skip to content

Commit

Permalink
test: updates
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Jun 1, 2021
1 parent 97ce0f0 commit 9ef0fa8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
13 changes: 9 additions & 4 deletions test/__snapshots__/validate-options.test.js.snap.webpack4
Original file line number Diff line number Diff line change
Expand Up @@ -414,25 +414,30 @@ exports[`options validate should throw an error on the "open" option with '{"tar
* configuration.open.target should be a non-empty string."
`;

exports[`options validate should throw an error on the "port" option with '' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.port should be an non-empty string."
`;

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

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

Expand Down
13 changes: 9 additions & 4 deletions test/__snapshots__/validate-options.test.js.snap.webpack5
Original file line number Diff line number Diff line change
Expand Up @@ -414,25 +414,30 @@ exports[`options validate should throw an error on the "open" option with '{"tar
* configuration.open.target should be a non-empty string."
`;

exports[`options validate should throw an error on the "port" option with '' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.port should be an non-empty string."
`;

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

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

Expand Down

0 comments on commit 9ef0fa8

Please sign in to comment.