You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/__snapshots__/validate-options.test.js.snap
+50-14
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,9 @@
2
2
3
3
exports[`validate options should throw an error on the "options" option with "{"concurrency":true}" value 1`] =`
4
4
"Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
5
-
- options.options.concurrency should be a number."
5
+
- options.options.concurrency should be a number.
6
+
-> Limits the number of simultaneous requests to fs.
7
+
-> Read more at https://github.com/webpack-contrib/copy-webpack-plugin#concurrency"
6
8
`;
7
9
8
10
exports[`validate options should throw an error on the "options" option with "{"unknown":true}" value 1`] =`
@@ -29,12 +31,16 @@ exports[`validate options should throw an error on the "patterns" option with "[
29
31
30
32
exports[`validate options should throw an error on the "patterns" option with "[{"from":"","to":"dir","context":"context","noErrorOnMissing":"true"}]" value 1`] =`
31
33
"Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
32
-
- options.patterns[0].noErrorOnMissing should be a boolean."
34
+
- options.patterns[0].noErrorOnMissing should be a boolean.
35
+
-> Doesn't generate an error on missing file(s).
36
+
-> Read more at https://github.com/webpack-contrib/copy-webpack-plugin#noerroronmissing"
33
37
`;
34
38
35
39
exports[`validate options should throw an error on the "patterns" option with "[{"from":"","to":"dir","context":"context"}]" value 1`] =`
36
40
"Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
37
-
- options.patterns[0].from should be a non-empty string."
41
+
- options.patterns[0].from should be a non-empty string.
42
+
-> Glob or path from where we copy files.
43
+
-> Read more at https://github.com/webpack-contrib/copy-webpack-plugin#from"
38
44
`;
39
45
40
46
exports[`validate options should throw an error on the "patterns" option with "[{"from":"dir","info":"string"}]" value 1`] =`
@@ -44,6 +50,8 @@ exports[`validate options should throw an error on the "patterns" option with "[
44
50
Details:
45
51
*options.patterns[0].infoshouldbeoneofthese:
46
52
object { … } |function
53
+
-> Allows to add assets info.
54
+
-> Read more at https://github.com/webpack-contrib/copy-webpack-plugin#info
47
55
Details:
48
56
* options.patterns[0].info should be an object:
49
57
object { … }
@@ -57,6 +65,8 @@ exports[`validate options should throw an error on the "patterns" option with "[
57
65
Details:
58
66
*options.patterns[0].infoshouldbeoneofthese:
59
67
object { … } |function
68
+
-> Allows to add assets info.
69
+
-> Read more at https://github.com/webpack-contrib/copy-webpack-plugin#info
60
70
Details:
61
71
* options.patterns[0].info should be an object:
62
72
object { … }
@@ -65,18 +75,24 @@ exports[`validate options should throw an error on the "patterns" option with "[
65
75
66
76
exports[`validate options should throw an error on the "patterns" option with "[{"from":"test.txt","filter":"test"}]" value 1`] =`
67
77
"Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
68
-
- options.patterns[0].filter should be an instance of function."
78
+
- options.patterns[0].filter should be an instance of function.
79
+
-> Allows to filter copied assets.
80
+
-> Read more at https://github.com/webpack-contrib/copy-webpack-plugin#filter"
69
81
`;
70
82
71
83
exports[`validate options should throw an error on the "patterns" option with "[{"from":"test.txt","to":"dir","context":"context","force":"true"}]" value 1`] =`
72
84
"Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
73
-
- options.patterns[0].force should be a boolean."
85
+
- options.patterns[0].force should be a boolean.
86
+
-> Overwrites files already in 'compilation.assets' (usually added by other plugins/loaders).
87
+
-> Read more at https://github.com/webpack-contrib/copy-webpack-plugin#force"
74
88
`;
75
89
76
90
exports[`validate options should throw an error on the "patterns" option with "[{"from":"test.txt","to":"dir","context":"context","toType":"foo"}]" value 1`] =`
77
91
"Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
78
92
- options.patterns[0].toType should be one of these:
79
-
\\"dir\\" | \\"file\\" | \\"template\\""
93
+
\\"dir\\" | \\"file\\" | \\"template\\"
94
+
-> Determinate what is to option - directory, file or template.
95
+
-> Read more at https://github.com/webpack-contrib/copy-webpack-plugin#totype"
80
96
`;
81
97
82
98
exports[`validate options should throw an error on the "patterns" option with "[{"from":"test.txt","to":"dir","context":"context","transform":{"foo":"bar"}}]" value 1`] =`
@@ -92,6 +108,8 @@ exports[`validate options should throw an error on the "patterns" option with "[
* options.patterns[0].transform should be an object:
@@ -100,27 +118,37 @@ exports[`validate options should throw an error on the "patterns" option with "[
100
118
101
119
exports[`validate options should throw an error on the "patterns" option with "[{"from":"test.txt","to":"dir","context":"context","transformAll":true}]" value 1`] =`
102
120
"Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
103
-
- options.patterns[0].transformAll should be an instance of function."
121
+
- options.patterns[0].transformAll should be an instance of function.
122
+
-> Allows you to modify the contents of multiple files and save the result to one file.
123
+
-> Read more at https://github.com/webpack-contrib/copy-webpack-plugin#transformall"
104
124
`;
105
125
106
126
exports[`validate options should throw an error on the "patterns" option with "[{"from":"test.txt","to":"dir","context":true}]" value 1`] =`
107
127
"Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
108
-
- options.patterns[0].context should be a string."
128
+
- options.patterns[0].context should be a string.
129
+
-> A path that determines how to interpret the 'from' path.
130
+
-> Read more at https://github.com/webpack-contrib/copy-webpack-plugin#context"
109
131
`;
110
132
111
133
exports[`validate options should throw an error on the "patterns" option with "[{"from":"test.txt","to":"dir","priority":"5"}]" value 1`] =`
112
134
"Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
113
-
- options.patterns[0].priority should be a number."
135
+
- options.patterns[0].priority should be a number.
136
+
-> Allows to specify the priority of copying files with the same destination name.
137
+
-> Read more at https://github.com/webpack-contrib/copy-webpack-plugin#priority"
114
138
`;
115
139
116
140
exports[`validate options should throw an error on the "patterns" option with "[{"from":"test.txt","to":"dir","priority":true}]" value 1`] =`
117
141
"Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
118
-
- options.patterns[0].priority should be a number."
142
+
- options.patterns[0].priority should be a number.
143
+
-> Allows to specify the priority of copying files with the same destination name.
144
+
-> Read more at https://github.com/webpack-contrib/copy-webpack-plugin#priority"
119
145
`;
120
146
121
147
exports[`validate options should throw an error on the "patterns" option with "[{"from":"test.txt","to":"dir"}]" value 1`] =`
122
148
"Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
123
-
- options.patterns[0].priority should be a number."
149
+
- options.patterns[0].priority should be a number.
150
+
-> Allows to specify the priority of copying files with the same destination name.
151
+
-> Read more at https://github.com/webpack-contrib/copy-webpack-plugin#priority"
124
152
`;
125
153
126
154
exports[`validate options should throw an error on the "patterns" option with "[{"from":"test.txt","to":true,"context":"context"}]" value 1`] =`
@@ -130,25 +158,33 @@ exports[`validate options should throw an error on the "patterns" option with "[
130
158
Details:
131
159
*options.patterns[0].toshouldbeoneofthese:
132
160
string|function
161
+
-> Output path.
162
+
-> Read more at https://github.com/webpack-contrib/copy-webpack-plugin#to
133
163
Details:
134
164
* options.patterns[0].to should be a string.
135
165
* options.patterns[0].to should be an instance of function."
136
166
`;
137
167
138
168
exports[`validate options should throw an error on the "patterns" option with "[{"from":{"glob":"**/*","dot":false},"to":"dir","context":"context"}]" value 1`] =`
139
169
"Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
140
-
- options.patterns[0].from should be a non-empty string."
170
+
- options.patterns[0].from should be a non-empty string.
171
+
-> Glob or path from where we copy files.
172
+
-> Read more at https://github.com/webpack-contrib/copy-webpack-plugin#from"
141
173
`;
142
174
143
175
exports[`validate options should throw an error on the "patterns" option with "[{"from":true,"to":"dir","context":"context"}]" value 1`] =`
144
176
"Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
145
-
- options.patterns[0].from should be a non-empty string."
177
+
- options.patterns[0].from should be a non-empty string.
178
+
-> Glob or path from where we copy files.
179
+
-> Read more at https://github.com/webpack-contrib/copy-webpack-plugin#from"
146
180
`;
147
181
148
182
exports[`validate options should throw an error on the "patterns" option with "[{}]" value 1`] =`
149
183
"Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
150
184
- options.patterns[0] misses the property 'from'. Should be:
151
-
non-empty string"
185
+
non-empty string
186
+
-> Glob or path from where we copy files.
187
+
-> Read more at https://github.com/webpack-contrib/copy-webpack-plugin#from"
152
188
`;
153
189
154
190
exports[`validate options should throw an error on the "patterns" option with "{}" value 1`] =`
0 commit comments