Skip to content

Commit

Permalink
chore: update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
anshumanv committed Oct 21, 2021
1 parent 5490f1c commit 75960d2
Showing 1 changed file with 81 additions and 15 deletions.
96 changes: 81 additions & 15 deletions test/__snapshots__/validate-options.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,44 @@

exports[`validate options should throw an error on the "additionalCode" option with "/test/" value 1`] = `
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options.additionalCode should be a non-empty string."
- options.additionalCode should be a non-empty string.
-> Adds custom code as a preamble before the module's code.
-> Read more at https://webpack.js.org/loaders/imports-loader/#additionalcode"
`;

exports[`validate options should throw an error on the "additionalCode" option with "[""]" value 1`] = `
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options.additionalCode should be a non-empty string."
- options.additionalCode should be a non-empty string.
-> Adds custom code as a preamble before the module's code.
-> Read more at https://webpack.js.org/loaders/imports-loader/#additionalcode"
`;

exports[`validate options should throw an error on the "additionalCode" option with "[]" value 1`] = `
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options.additionalCode should be a non-empty string."
- options.additionalCode should be a non-empty string.
-> Adds custom code as a preamble before the module's code.
-> Read more at https://webpack.js.org/loaders/imports-loader/#additionalcode"
`;

exports[`validate options should throw an error on the "additionalCode" option with "{}" value 1`] = `
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options.additionalCode should be a non-empty string."
- options.additionalCode should be a non-empty string.
-> Adds custom code as a preamble before the module's code.
-> Read more at https://webpack.js.org/loaders/imports-loader/#additionalcode"
`;

exports[`validate options should throw an error on the "additionalCode" option with "false" value 1`] = `
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options.additionalCode should be a non-empty string."
- options.additionalCode should be a non-empty string.
-> Adds custom code as a preamble before the module's code.
-> Read more at https://webpack.js.org/loaders/imports-loader/#additionalcode"
`;

exports[`validate options should throw an error on the "additionalCode" option with "true" value 1`] = `
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options.additionalCode should be a non-empty string."
- options.additionalCode should be a non-empty string.
-> Adds custom code as a preamble before the module's code.
-> Read more at https://webpack.js.org/loaders/imports-loader/#additionalcode"
`;

exports[`validate options should throw an error on the "imports" option with "" value 1`] = `
Expand All @@ -36,7 +48,11 @@ exports[`validate options should throw an error on the "imports" option with ""
non-empty string | non-empty string | object { moduleName, syntax?, name?, alias? } | [non-empty string | object { moduleName, syntax?, name?, alias? }, ...] (should not have fewer than 1 item)
Details:
* options.imports should be a non-empty string.
* options.imports should be a non-empty string."
-> Allows to use a string to describe an import.
-> Read more at https://webpack.js.org/loaders/imports-loader/#string
* options.imports should be a non-empty string.
-> Allows to use a string to describe an import.
-> Read more at https://webpack.js.org/loaders/imports-loader/#string"
`;
exports[`validate options should throw an error on the "imports" option with "/test/" value 1`] = `
Expand All @@ -47,7 +63,9 @@ exports[`validate options should throw an error on the "imports" option with "/t
exports[`validate options should throw an error on the "imports" option with "[""]" value 1`] = `
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options.imports[0] should be a non-empty string."
- options.imports[0] should be a non-empty string.
-> Allows to use a string to describe an import.
-> Read more at https://webpack.js.org/loaders/imports-loader/#string"
`;
exports[`validate options should throw an error on the "imports" option with "[]" value 1`] = `
Expand All @@ -73,8 +91,12 @@ exports[`validate options should throw an error on the "imports" option with "{"
Details:
* options.imports has an unknown property 'type'. These properties are valid:
object { moduleName, syntax?, name?, alias? }
-> Allows to use an object to describe an import.
-> Read more at https://webpack.js.org/loaders/imports-loader/#object
* options.imports has an unknown property 'list'. These properties are valid:
object { moduleName, syntax?, name?, alias? }"
object { moduleName, syntax?, name?, alias? }
-> Allows to use an object to describe an import.
-> Read more at https://webpack.js.org/loaders/imports-loader/#object"
`;
exports[`validate options should throw an error on the "imports" option with "{}" value 1`] = `
Expand All @@ -88,13 +110,19 @@ exports[`validate options should throw an error on the "imports" option with "fa
- options.imports should be one of these:
non-empty string | non-empty string | object { moduleName, syntax?, name?, alias? } | [non-empty string | object { moduleName, syntax?, name?, alias? }, ...] (should not have fewer than 1 item)
Details:
* options.imports should be a non-empty string.
* options.imports should be one of these:
non-empty string | object { moduleName, syntax?, name?, alias? }
Details:
* options.imports should be a non-empty string.
-> Allows to use a string to describe an import.
-> Read more at https://webpack.js.org/loaders/imports-loader/#string
* options.imports should be a non-empty string.
-> Allows to use a string to describe an import.
-> Read more at https://webpack.js.org/loaders/imports-loader/#string
* options.imports should be an object:
object { moduleName, syntax?, name?, alias? }
-> Allows to use an object to describe an import.
-> Read more at https://webpack.js.org/loaders/imports-loader/#object
* options.imports should be an array:
[non-empty string | object { moduleName, syntax?, name?, alias? }, ...] (should not have fewer than 1 item)"
`;
Expand All @@ -104,48 +132,64 @@ exports[`validate options should throw an error on the "imports" option with "tr
- options.imports should be one of these:
non-empty string | non-empty string | object { moduleName, syntax?, name?, alias? } | [non-empty string | object { moduleName, syntax?, name?, alias? }, ...] (should not have fewer than 1 item)
Details:
* options.imports should be a non-empty string.
* options.imports should be one of these:
non-empty string | object { moduleName, syntax?, name?, alias? }
Details:
* options.imports should be a non-empty string.
-> Allows to use a string to describe an import.
-> Read more at https://webpack.js.org/loaders/imports-loader/#string
* options.imports should be a non-empty string.
-> Allows to use a string to describe an import.
-> Read more at https://webpack.js.org/loaders/imports-loader/#string
* options.imports should be an object:
object { moduleName, syntax?, name?, alias? }
-> Allows to use an object to describe an import.
-> Read more at https://webpack.js.org/loaders/imports-loader/#object
* options.imports should be an array:
[non-empty string | object { moduleName, syntax?, name?, alias? }, ...] (should not have fewer than 1 item)"
`;
exports[`validate options should throw an error on the "type" option with "" value 1`] = `
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options.type should be one of these:
\\"module\\" | \\"commonjs\\""
\\"module\\" | \\"commonjs\\"
-> Format of generated exports.
-> Read more at https://github.com/webpack-contrib/imports-loader#type"
`;
exports[`validate options should throw an error on the "type" option with "[]" value 1`] = `
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options.type should be one of these:
\\"module\\" | \\"commonjs\\""
\\"module\\" | \\"commonjs\\"
-> Format of generated exports.
-> Read more at https://github.com/webpack-contrib/imports-loader#type"
`;
exports[`validate options should throw an error on the "type" option with "{}" value 1`] = `
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options.type should be one of these:
\\"module\\" | \\"commonjs\\""
\\"module\\" | \\"commonjs\\"
-> Format of generated exports.
-> Read more at https://github.com/webpack-contrib/imports-loader#type"
`;
exports[`validate options should throw an error on the "type" option with "string" value 1`] = `
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options.type should be one of these:
\\"module\\" | \\"commonjs\\""
\\"module\\" | \\"commonjs\\"
-> Format of generated exports.
-> Read more at https://github.com/webpack-contrib/imports-loader#type"
`;
exports[`validate options should throw an error on the "unknown" option with "/test/" value 1`] = `
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options should be one of these:
object { imports, … } | object { wrapper, … } | object { additionalCode, … }
-> Options for imports-loader
Details:
* options has an unknown property 'unknown'. These properties are valid:
object { imports, … } | object { wrapper, … } | object { additionalCode, … }
-> Options for imports-loader
* options misses the property 'imports' | should be any non-object.
* options misses the property 'wrapper' | should be any non-object.
* options misses the property 'additionalCode' | should be any non-object."
Expand All @@ -155,9 +199,11 @@ exports[`validate options should throw an error on the "unknown" option with "[]
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options should be one of these:
object { imports, … } | object { wrapper, … } | object { additionalCode, … }
-> Options for imports-loader
Details:
* options has an unknown property 'unknown'. These properties are valid:
object { imports, … } | object { wrapper, … } | object { additionalCode, … }
-> Options for imports-loader
* options misses the property 'imports' | should be any non-object.
* options misses the property 'wrapper' | should be any non-object.
* options misses the property 'additionalCode' | should be any non-object."
Expand All @@ -167,9 +213,11 @@ exports[`validate options should throw an error on the "unknown" option with "{"
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options should be one of these:
object { imports, … } | object { wrapper, … } | object { additionalCode, … }
-> Options for imports-loader
Details:
* options has an unknown property 'unknown'. These properties are valid:
object { imports, … } | object { wrapper, … } | object { additionalCode, … }
-> Options for imports-loader
* options misses the property 'imports' | should be any non-object.
* options misses the property 'wrapper' | should be any non-object.
* options misses the property 'additionalCode' | should be any non-object."
Expand All @@ -179,9 +227,11 @@ exports[`validate options should throw an error on the "unknown" option with "{}
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options should be one of these:
object { imports, … } | object { wrapper, … } | object { additionalCode, … }
-> Options for imports-loader
Details:
* options has an unknown property 'unknown'. These properties are valid:
object { imports, … } | object { wrapper, … } | object { additionalCode, … }
-> Options for imports-loader
* options misses the property 'imports' | should be any non-object.
* options misses the property 'wrapper' | should be any non-object.
* options misses the property 'additionalCode' | should be any non-object."
Expand All @@ -191,9 +241,11 @@ exports[`validate options should throw an error on the "unknown" option with "1"
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options should be one of these:
object { imports, … } | object { wrapper, … } | object { additionalCode, … }
-> Options for imports-loader
Details:
* options has an unknown property 'unknown'. These properties are valid:
object { imports, … } | object { wrapper, … } | object { additionalCode, … }
-> Options for imports-loader
* options misses the property 'imports' | should be any non-object.
* options misses the property 'wrapper' | should be any non-object.
* options misses the property 'additionalCode' | should be any non-object."
Expand All @@ -203,9 +255,11 @@ exports[`validate options should throw an error on the "unknown" option with "fa
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options should be one of these:
object { imports, … } | object { wrapper, … } | object { additionalCode, … }
-> Options for imports-loader
Details:
* options has an unknown property 'unknown'. These properties are valid:
object { imports, … } | object { wrapper, … } | object { additionalCode, … }
-> Options for imports-loader
* options misses the property 'imports' | should be any non-object.
* options misses the property 'wrapper' | should be any non-object.
* options misses the property 'additionalCode' | should be any non-object."
Expand All @@ -215,9 +269,11 @@ exports[`validate options should throw an error on the "unknown" option with "te
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options should be one of these:
object { imports, … } | object { wrapper, … } | object { additionalCode, … }
-> Options for imports-loader
Details:
* options has an unknown property 'unknown'. These properties are valid:
object { imports, … } | object { wrapper, … } | object { additionalCode, … }
-> Options for imports-loader
* options misses the property 'imports' | should be any non-object.
* options misses the property 'wrapper' | should be any non-object.
* options misses the property 'additionalCode' | should be any non-object."
Expand All @@ -227,9 +283,11 @@ exports[`validate options should throw an error on the "unknown" option with "tr
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options should be one of these:
object { imports, … } | object { wrapper, … } | object { additionalCode, … }
-> Options for imports-loader
Details:
* options has an unknown property 'unknown'. These properties are valid:
object { imports, … } | object { wrapper, … } | object { additionalCode, … }
-> Options for imports-loader
* options misses the property 'imports' | should be any non-object.
* options misses the property 'wrapper' | should be any non-object.
* options misses the property 'additionalCode' | should be any non-object."
Expand All @@ -245,6 +303,8 @@ exports[`validate options should throw an error on the "wrapper" option with "["
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options.wrapper should be one of these:
boolean | non-empty string | object { thisArg, args? }
-> Closes the module code in a function with a given 'thisArg' and 'args'
-> Read more at https://webpack.js.org/loaders/imports-loader/#wrapper
Details:
* options.wrapper should be a boolean.
* options.wrapper should be a non-empty string.
Expand All @@ -256,6 +316,8 @@ exports[`validate options should throw an error on the "wrapper" option with "[]
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options.wrapper should be one of these:
boolean | non-empty string | object { thisArg, args? }
-> Closes the module code in a function with a given 'thisArg' and 'args'
-> Read more at https://webpack.js.org/loaders/imports-loader/#wrapper
Details:
* options.wrapper should be a boolean.
* options.wrapper should be a non-empty string.
Expand All @@ -272,6 +334,8 @@ exports[`validate options should throw an error on the "wrapper" option with "{"
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options.wrapper should be one of these:
boolean | non-empty string | object { thisArg, args? }
-> Closes the module code in a function with a given 'thisArg' and 'args'
-> Read more at https://webpack.js.org/loaders/imports-loader/#wrapper
Details:
* options.wrapper.args should be one of these:
[non-empty string, ...] (should not have fewer than 1 item) | object { … }
Expand All @@ -291,6 +355,8 @@ exports[`validate options should throw an error on the "wrapper" option with "{"
"Invalid options object. Imports Loader has been initialized using an options object that does not match the API schema.
- options.wrapper should be one of these:
boolean | non-empty string | object { thisArg, args? }
-> Closes the module code in a function with a given 'thisArg' and 'args'
-> Read more at https://webpack.js.org/loaders/imports-loader/#wrapper
Details:
* options.wrapper has an unknown property 'unknown'. These properties are valid:
object { thisArg, args? }
Expand Down

0 comments on commit 75960d2

Please sign in to comment.