-
-
Notifications
You must be signed in to change notification settings - Fork 381
Expand file tree
/
Copy pathvalidation-options.test.js.snap.webpack5
More file actions
209 lines (185 loc) · 11.5 KB
/
validation-options.test.js.snap.webpack5
File metadata and controls
209 lines (185 loc) · 11.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`validation should throw an error on the "cacheControl" option with "{"unknown":true,"maxAge":10000}" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.cacheControl has an unknown property 'unknown'. These properties are valid:
object { maxAge?, immutable? }"
`;
exports[`validation should throw an error on the "cacheImmutable" option with "0" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.cacheImmutable should be a boolean.
-> Enable or disable setting \`Cache-Control: public, max-age=31536000, immutable\` response header for immutable assets (i.e. asset with a hash in file name like \`image.a4c12bde.jpg\`).
-> Read more at https://github.com/webpack/webpack-dev-middleware#cacheimmutable"
`;
exports[`validation should throw an error on the "cacheImmutable" option with "foo" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.cacheImmutable should be a boolean.
-> Enable or disable setting \`Cache-Control: public, max-age=31536000, immutable\` response header for immutable assets (i.e. asset with a hash in file name like \`image.a4c12bde.jpg\`).
-> Read more at https://github.com/webpack/webpack-dev-middleware#cacheimmutable"
`;
exports[`validation should throw an error on the "etag" option with "0" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.etag should be one of these:
"weak" | "strong"
-> Enable or disable etag generation.
-> Read more at https://github.com/webpack/webpack-dev-middleware#etag"
`;
exports[`validation should throw an error on the "etag" option with "foo" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.etag should be one of these:
"weak" | "strong"
-> Enable or disable etag generation.
-> Read more at https://github.com/webpack/webpack-dev-middleware#etag"
`;
exports[`validation should throw an error on the "headers" option with "[]" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.headers should be a non-empty array."
`;
exports[`validation should throw an error on the "headers" option with "[{"foo":"bar"}]" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.headers[0] has an unknown property 'foo'. These properties are valid:
object { key?, value? }"
`;
exports[`validation should throw an error on the "headers" option with "1" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.headers should be one of these:
[object { key?, value? }, ...] (should not have fewer than 1 item) | object { … } | function
-> Allows to pass custom HTTP headers on each request
-> Read more at https://github.com/webpack/webpack-dev-middleware#headers
Details:
* options.headers should be an array:
[object { key?, value? }, ...] (should not have fewer than 1 item)
* options.headers should be an object:
object { … }
* options.headers should be an instance of function."
`;
exports[`validation should throw an error on the "headers" option with "true" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.headers should be one of these:
[object { key?, value? }, ...] (should not have fewer than 1 item) | object { … } | function
-> Allows to pass custom HTTP headers on each request
-> Read more at https://github.com/webpack/webpack-dev-middleware#headers
Details:
* options.headers should be an array:
[object { key?, value? }, ...] (should not have fewer than 1 item)
* options.headers should be an object:
object { … }
* options.headers should be an instance of function."
`;
exports[`validation should throw an error on the "index" option with "{}" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.index should be one of these:
boolean | non-empty string
-> Allows to serve an index of the directory.
-> Read more at https://github.com/webpack/webpack-dev-middleware#index
Details:
* options.index should be a boolean.
* options.index should be a non-empty string."
`;
exports[`validation should throw an error on the "index" option with "0" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.index should be one of these:
boolean | non-empty string
-> Allows to serve an index of the directory.
-> Read more at https://github.com/webpack/webpack-dev-middleware#index
Details:
* options.index should be a boolean.
* options.index should be a non-empty string."
`;
exports[`validation should throw an error on the "lastModified" option with "0" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.lastModified should be a boolean.
-> Enable or disable \`Last-Modified\` header. Uses the file system's last modified value.
-> Read more at https://github.com/webpack/webpack-dev-middleware#lastmodified"
`;
exports[`validation should throw an error on the "lastModified" option with "foo" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.lastModified should be a boolean.
-> Enable or disable \`Last-Modified\` header. Uses the file system's last modified value.
-> Read more at https://github.com/webpack/webpack-dev-middleware#lastmodified"
`;
exports[`validation should throw an error on the "methods" option with "{}" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.methods should be an array:
[non-empty string, ...]
-> Allows to pass the list of HTTP request methods accepted by the middleware.
-> Read more at https://github.com/webpack/webpack-dev-middleware#methods"
`;
exports[`validation should throw an error on the "methods" option with "true" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.methods should be an array:
[non-empty string, ...]
-> Allows to pass the list of HTTP request methods accepted by the middleware.
-> Read more at https://github.com/webpack/webpack-dev-middleware#methods"
`;
exports[`validation should throw an error on the "mimeTypeDefault" option with "0" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.mimeTypeDefault should be a string.
-> Allows a user to register a default mime type when we can't determine the content type.
-> Read more at https://github.com/webpack/webpack-dev-middleware#mimetypedefault"
`;
exports[`validation should throw an error on the "mimeTypes" option with "foo" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.mimeTypes should be an object:
object { … }
-> Allows a user to register custom mime types or extension mappings.
-> Read more at https://github.com/webpack/webpack-dev-middleware#mimetypes"
`;
exports[`validation should throw an error on the "modifyResponseData" option with "true" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.modifyResponseData should be an instance of function.
-> Allows to set up a callback to change the response data.
-> Read more at https://github.com/webpack/webpack-dev-middleware#modifyresponsedata"
`;
exports[`validation should throw an error on the "outputFileSystem" option with "false" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.outputFileSystem should be an object:
object { … }
-> Set the default file system which will be used by webpack as primary destination of generated files.
-> Read more at https://github.com/webpack/webpack-dev-middleware#outputfilesystem"
`;
exports[`validation should throw an error on the "publicPath" option with "false" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.publicPath should be one of these:
"auto" | string | function
-> The \`publicPath\` specifies the public URL address of the output files when referenced in a browser.
-> Read more at https://github.com/webpack/webpack-dev-middleware#publicpath
Details:
* options.publicPath should be "auto".
* options.publicPath should be a string.
* options.publicPath should be an instance of function."
`;
exports[`validation should throw an error on the "serverSideRender" option with "0" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.serverSideRender should be a boolean.
-> Instructs the module to enable or disable the server-side rendering mode.
-> Read more at https://github.com/webpack/webpack-dev-middleware#serversiderender"
`;
exports[`validation should throw an error on the "serverSideRender" option with "foo" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.serverSideRender should be a boolean.
-> Instructs the module to enable or disable the server-side rendering mode.
-> Read more at https://github.com/webpack/webpack-dev-middleware#serversiderender"
`;
exports[`validation should throw an error on the "stats" option with "0" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.stats should be one of these:
"none" | "summary" | "errors-only" | "errors-warnings" | "minimal" | "normal" | "detailed" | "verbose" | boolean | object { … }
-> Stats options object or preset name.
-> Read more at https://github.com/webpack/webpack-dev-middleware#stats
Details:
* options.stats should be one of these:
"none" | "summary" | "errors-only" | "errors-warnings" | "minimal" | "normal" | "detailed" | "verbose"
* options.stats should be a boolean.
* options.stats should be an object:
object { … }"
`;
exports[`validation should throw an error on the "writeToDisk" option with "{}" value 1`] = `
"Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.
- options.writeToDisk should be one of these:
boolean | function
-> Allows to write generated files on disk.
-> Read more at https://github.com/webpack/webpack-dev-middleware#writetodisk
Details:
* options.writeToDisk should be a boolean.
* options.writeToDisk should be an instance of function."
`;