Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
anshumanv committed May 21, 2021
1 parent 3bdb111 commit 3507a4d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
6 changes: 0 additions & 6 deletions lib/options.json
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,6 @@
"anyOf": [
{
"type": "number"
},
{
"type": "string"
},
{
"enum": ["auto"]
}
],
"description": "Tells clients connected to devServer to use the provided path to connect."
Expand Down
18 changes: 11 additions & 7 deletions test/__snapshots__/validate-options.test.js.snap.webpack4
Original file line number Diff line number Diff line change
Expand Up @@ -577,16 +577,20 @@ exports[`options validate should throw an error on the "webSocketURL" option wit
-> Tells clients connected to devServer to use the provided path to connect."
`;

exports[`options validate should throw an error on the "webSocketURL" option with '{"port":""}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.webSocketURL should be one of these:
string | object { host?, path?, port?, … }
Details:
* configuration.webSocketURL.port should be a number.
-> Tells clients connected to devServer to use the provided path to connect."
`;

exports[`options validate should throw an error on the "webSocketURL" option with '{"port":true}' value 1`] = `
"ValidationError: Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.webSocketURL should be one of these:
string | object { host?, path?, port?, … }
Details:
* configuration.webSocketURL.port should be one of these:
number | string | \\"auto\\"
-> Tells clients connected to devServer to use the provided path to connect.
Details:
* configuration.webSocketURL.port should be a number.
* configuration.webSocketURL.port should be a string.
* configuration.webSocketURL.port should be \\"auto\\"."
* configuration.webSocketURL.port should be a number.
-> Tells clients connected to devServer to use the provided path to connect."
`;
8 changes: 5 additions & 3 deletions test/validate-options.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,17 +293,16 @@ const tests = {
path: '',
},
{
port: '',
port: 8080,
},
{
host: '',
path: '',
port: '',
},
{
host: '',
path: '',
port: 'auto',
port: 8080,
},
],
failure: [
Expand All @@ -318,6 +317,9 @@ const tests = {
{
port: true,
},
{
port: '',
},
],
},
webSocketServer: {
Expand Down

0 comments on commit 3507a4d

Please sign in to comment.