Skip to content

Commit dc409e7

Browse files
committed
test: Update test cases
1 parent 887422e commit dc409e7

5 files changed

Lines changed: 97 additions & 97 deletions

File tree

packages/project/test/lib/validation/schema/__helper__/builder-bundleOptions.js

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ export default {
6262
}, [
6363
{
6464
keyword: "additionalProperties",
65-
dataPath: "/builder/bundles/0/bundleOptions",
65+
instancePath: "/builder/bundles/0/bundleOptions",
6666
params: {
6767
additionalProperty: "usePredefineCalls",
6868
},
69-
message: "should NOT have additional properties",
69+
message: "must NOT have additional properties",
7070
},
7171
]);
7272
});
@@ -94,46 +94,46 @@ export default {
9494
}, [
9595
{
9696
keyword: "type",
97-
dataPath: "/builder/bundles/0/bundleOptions/optimize",
97+
instancePath: "/builder/bundles/0/bundleOptions/optimize",
9898
params: {
9999
type: "boolean",
100100
},
101-
message: "should be boolean"
101+
message: "must be boolean"
102102
},
103103
{
104104
keyword: "type",
105-
dataPath:
105+
instancePath:
106106
"/builder/bundles/0/bundleOptions/decorateBootstrapModule",
107107
params: {
108108
type: "boolean",
109109
},
110-
message: "should be boolean"
110+
message: "must be boolean"
111111
},
112112
{
113113
keyword: "type",
114-
dataPath:
114+
instancePath:
115115
"/builder/bundles/0/bundleOptions/addTryCatchRestartWrapper",
116116
params: {
117117
type: "boolean",
118118
},
119-
message: "should be boolean"
119+
message: "must be boolean"
120120
},
121121
{
122122
keyword: "type",
123-
dataPath:
123+
instancePath:
124124
"/builder/bundles/0/bundleOptions/numberOfParts",
125125
params: {
126126
type: "number",
127127
},
128-
message: "should be number"
128+
message: "must be number"
129129
},
130130
{
131131
keyword: "type",
132-
dataPath: "/builder/bundles/0/bundleOptions/sourceMap",
132+
instancePath: "/builder/bundles/0/bundleOptions/sourceMap",
133133
params: {
134134
type: "boolean",
135135
},
136-
message: "should be boolean"
136+
message: "must be boolean"
137137
}
138138
]);
139139
});
@@ -187,11 +187,11 @@ export default {
187187
}, [
188188
{
189189
keyword: "additionalProperties",
190-
dataPath: "/builder/bundles/0/bundleOptions",
190+
instancePath: "/builder/bundles/0/bundleOptions",
191191
params: {
192192
additionalProperty: "debugMode",
193193
},
194-
message: "should NOT have additional properties",
194+
message: "must NOT have additional properties",
195195
},
196196
]);
197197
});
@@ -220,55 +220,55 @@ export default {
220220
}, [
221221
{
222222
keyword: "type",
223-
dataPath: "/builder/bundles/0/bundleOptions/optimize",
223+
instancePath: "/builder/bundles/0/bundleOptions/optimize",
224224
params: {
225225
type: "boolean",
226226
},
227-
message: "should be boolean"
227+
message: "must be boolean"
228228
},
229229
{
230230
keyword: "type",
231-
dataPath:
231+
instancePath:
232232
"/builder/bundles/0/bundleOptions/decorateBootstrapModule",
233233
params: {
234234
type: "boolean",
235235
},
236-
message: "should be boolean"
236+
message: "must be boolean"
237237
},
238238
{
239239
keyword: "type",
240-
dataPath:
240+
instancePath:
241241
"/builder/bundles/0/bundleOptions/addTryCatchRestartWrapper",
242242
params: {
243243
type: "boolean",
244244
},
245-
message: "should be boolean"
245+
message: "must be boolean"
246246
},
247247
{
248248
keyword: "type",
249-
dataPath:
249+
instancePath:
250250
"/builder/bundles/0/bundleOptions/usePredefineCalls",
251251
params: {
252252
type: "boolean",
253253
},
254-
message: "should be boolean"
254+
message: "must be boolean"
255255
},
256256
{
257257
keyword: "type",
258-
dataPath:
258+
instancePath:
259259
"/builder/bundles/0/bundleOptions/numberOfParts",
260260
params: {
261261
type: "number",
262262
},
263-
message: "should be number"
263+
message: "must be number"
264264
},
265265
{
266266
keyword: "type",
267-
dataPath: "/builder/bundles/0/bundleOptions/sourceMap",
267+
instancePath: "/builder/bundles/0/bundleOptions/sourceMap",
268268
params: {
269269
type: "boolean",
270270
},
271-
message: "should be boolean"
271+
message: "must be boolean"
272272
}
273273
]);
274274
});

packages/project/test/lib/validation/schema/__helper__/customConfiguration.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ export default {
2929
"customConfiguration": {}
3030
}, additionalConfiguration), [
3131
{
32-
dataPath: "",
32+
instancePath: "",
3333
keyword: "additionalProperties",
34-
message: "should NOT have additional properties",
34+
message: "must NOT have additional properties",
3535
params: {
3636
additionalProperty: "customConfiguration",
3737
}

packages/project/test/lib/validation/schema/__helper__/extension.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ export default {
3939
},
4040
"resources": {}
4141
}, additionalConfiguration), [{
42-
dataPath: "",
42+
instancePath: "",
4343
keyword: "additionalProperties",
44-
message: "should NOT have additional properties",
44+
message: "must NOT have additional properties",
4545
params: {
4646
"additionalProperty": "resources"
4747
}
@@ -58,9 +58,9 @@ export default {
5858
},
5959
"notAllowed": true
6060
}, additionalConfiguration), [{
61-
dataPath: "",
61+
instancePath: "",
6262
keyword: "additionalProperties",
63-
message: "should NOT have additional properties",
63+
message: "must NOT have additional properties",
6464
params: {
6565
additionalProperty: "notAllowed",
6666
}
@@ -77,9 +77,9 @@ export default {
7777
"name": {}
7878
}
7979
}, additionalConfiguration), [{
80-
dataPath: "/metadata/name",
80+
instancePath: "/metadata/name",
8181
keyword: "type",
82-
message: "should be string",
82+
message: "must be string",
8383
params: {
8484
type: "string"
8585
}
@@ -96,26 +96,26 @@ export default {
9696
"name": {}
9797
}
9898
}, additionalConfiguration), [{
99-
dataPath: "/metadata/name",
100-
keyword: "type",
101-
message: "should be string",
102-
params: {
103-
type: "string",
104-
},
105-
}, {
106-
dataPath: "/metadata/name",
99+
instancePath: "/metadata/name",
107100
keyword: "errorMessage",
108101
message: `Not a valid extension name. It must consist of lowercase alphanumeric characters, dash, underscore, and period only. Additionally, it may contain an npm-style package scope. For details, see: https://ui5.github.io/cli/stable/pages/Configuration/#name`,
109102
params: {
110103
errors: [{
111-
dataPath: "/metadata/name",
104+
instancePath: "/metadata/name",
112105
keyword: "type",
113-
message: "should be string",
106+
message: "must be string",
114107
params: {
115108
type: "string",
116109
}
117110
}]
118111
},
112+
}, {
113+
instancePath: "/metadata/name",
114+
keyword: "type",
115+
message: "must be string",
116+
params: {
117+
type: "string",
118+
}
119119
}]);
120120
});
121121
});

packages/project/test/lib/validation/schema/__helper__/framework.js

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ export default {
8888

8989
await assertValidation(t, config, [
9090
{
91-
dataPath: "/framework/name",
91+
instancePath: "/framework/name",
9292
keyword: "enum",
93-
message: "should be equal to one of the allowed values",
93+
message: "must be equal to one of the allowed values",
9494
params: {
9595
allowedValues: [
9696
"OpenUI5",
@@ -99,16 +99,16 @@ export default {
9999
}
100100
},
101101
{
102-
dataPath: "/framework/version",
102+
instancePath: "/framework/version",
103103
keyword: "errorMessage",
104104
message: "Not a valid version according to the Semantic Versioning specification (https://semver.org/)",
105105
params: {
106106
errors: [
107107
{
108-
dataPath: "/framework/version",
108+
instancePath: "/framework/version",
109109
keyword: "pattern",
110110
message:
111-
"should match pattern \"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)" +
111+
"must match pattern \"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)" +
112112
"(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*" +
113113
"[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\"",
114114
params: {
@@ -122,41 +122,41 @@ export default {
122122
}
123123
},
124124
{
125-
dataPath: "/framework/libraries/0",
125+
instancePath: "/framework/libraries/0",
126126
keyword: "type",
127-
message: "should be object",
127+
message: "must be object",
128128
params: {
129129
type: "object",
130130
}
131131
},
132132
{
133-
dataPath: "/framework/libraries/1",
134-
keyword: "additionalProperties",
135-
message: "should NOT have additional properties",
133+
instancePath: "/framework/libraries/1",
134+
keyword: "required",
135+
message: "must have required property 'name'",
136136
params: {
137-
additionalProperty: "library",
137+
missingProperty: "name",
138138
}
139139
},
140140
{
141-
dataPath: "/framework/libraries/1",
142-
keyword: "required",
143-
message: "should have required property 'name'",
141+
instancePath: "/framework/libraries/1",
142+
keyword: "additionalProperties",
143+
message: "must NOT have additional properties",
144144
params: {
145-
missingProperty: "name",
145+
additionalProperty: "library",
146146
}
147147
},
148148
{
149-
dataPath: "/framework/libraries/2/optional",
149+
instancePath: "/framework/libraries/2/optional",
150150
keyword: "type",
151-
message: "should be boolean",
151+
message: "must be boolean",
152152
params: {
153153
type: "boolean"
154154
}
155155
},
156156
{
157-
dataPath: "/framework/libraries/3/development",
157+
instancePath: "/framework/libraries/3/development",
158158
keyword: "type",
159-
message: "should be boolean",
159+
message: "must be boolean",
160160
params: {
161161
type: "boolean"
162162
}
@@ -174,9 +174,9 @@ export default {
174174
"framework": {}
175175
}, [
176176
{
177-
dataPath: "/framework",
177+
instancePath: "/framework",
178178
keyword: "required",
179-
message: "should have required property 'name'",
179+
message: "must have required property 'name'",
180180
params: {
181181
missingProperty: "name"
182182
}
@@ -211,23 +211,23 @@ export default {
211211
}
212212
}, [
213213
{
214-
dataPath: "/framework/libraries/0",
214+
instancePath: "/framework/libraries/0",
215215
keyword: "errorMessage",
216216
message: "Either \"development\" or \"optional\" can be true, but not both",
217217
params: {
218218
errors: [
219219
{
220-
dataPath: "/framework/libraries/0",
220+
instancePath: "/framework/libraries/0",
221221
keyword: "additionalProperties",
222-
message: "should NOT have additional properties",
222+
message: "must NOT have additional properties",
223223
params: {
224224
additionalProperty: "development",
225225
}
226226
},
227227
{
228-
dataPath: "/framework/libraries/0",
228+
instancePath: "/framework/libraries/0",
229229
keyword: "additionalProperties",
230-
message: "should NOT have additional properties",
230+
message: "must NOT have additional properties",
231231
params: {
232232
additionalProperty: "optional",
233233
}
@@ -236,17 +236,17 @@ export default {
236236
}
237237
},
238238
{
239-
dataPath: "/framework/libraries/1/optional",
239+
instancePath: "/framework/libraries/1/optional",
240240
keyword: "type",
241-
message: "should be boolean",
241+
message: "must be boolean",
242242
params: {
243243
type: "boolean",
244244
}
245245
},
246246
{
247-
dataPath: "/framework/libraries/1/development",
247+
instancePath: "/framework/libraries/1/development",
248248
keyword: "type",
249-
message: "should be boolean",
249+
message: "must be boolean",
250250
params: {
251251
type: "boolean",
252252
}

0 commit comments

Comments
 (0)