Skip to content

Commit 92c06e3

Browse files
committed
Minor schema refactors
1 parent f5fa711 commit 92c06e3

File tree

10 files changed

+18
-65
lines changed

10 files changed

+18
-65
lines changed

test/schema.json

Lines changed: 9 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"type": "string",
1717
"description": "Information about the test scenario."
1818
},
19-
"defaultTestParams": {
20-
"$ref": "#/$defs/defaultTestParams"
19+
"defaultTestProperties": {
20+
"$ref": "#/$defs/defaultTestProperties"
2121
},
2222
"tests": {
2323
"type": "array",
@@ -27,13 +27,13 @@
2727
"minItems": 1
2828
}
2929
},
30-
"$comment": "This allOf specifies required test properties that allow a default. A value will be required in 'defaultTestParams' if one is not provided for every individual test.",
30+
"$comment": "This allOf specifies required test properties that allow a default. A value will be required in 'defaultTestProperties' if one is not provided for every individual test.",
3131
"allOf": [
3232
{
3333
"anyOf": [
3434
{
3535
"properties": {
36-
"defaultTestParams": {
36+
"defaultTestProperties": {
3737
"required": [
3838
"testType"
3939
]
@@ -58,7 +58,7 @@
5858
"anyOf": [
5959
{
6060
"properties": {
61-
"defaultTestParams": {
61+
"defaultTestProperties": {
6262
"required": [
6363
"locale"
6464
]
@@ -83,7 +83,7 @@
8383
"anyOf": [
8484
{
8585
"properties": {
86-
"defaultTestParams": {
86+
"defaultTestProperties": {
8787
"required": [
8888
"src"
8989
]
@@ -109,7 +109,7 @@
109109
"anyOf": [
110110
{
111111
"properties": {
112-
"defaultTestParams": {
112+
"defaultTestProperties": {
113113
"$ref": "#/$defs/anyExp"
114114
}
115115
}
@@ -128,7 +128,7 @@
128128
}
129129
],
130130
"$defs": {
131-
"defaultTestParams": {
131+
"defaultTestProperties": {
132132
"type": "object",
133133
"additionalProperties": false,
134134
"properties": {
@@ -222,35 +222,18 @@
222222
"type": "object",
223223
"additionalProperties": false,
224224
"required": [
225-
"type",
226225
"value"
227226
],
228227
"properties": {
229228
"name": {
230229
"type": "string"
231230
},
232231
"type": {
233-
"enum": [
234-
"boolean",
235-
"datetime",
236-
"null",
237-
"number",
238-
"string"
239-
]
232+
"const": "datetime"
240233
},
241234
"value": {}
242235
},
243236
"oneOf": [
244-
{
245-
"properties": {
246-
"type": {
247-
"const": "boolean"
248-
},
249-
"value": {
250-
"type": "boolean"
251-
}
252-
}
253-
},
254237
{
255238
"properties": {
256239
"type": {
@@ -260,36 +243,6 @@
260243
"type": "string"
261244
}
262245
}
263-
},
264-
{
265-
"properties": {
266-
"type": {
267-
"const": "null"
268-
},
269-
"value": {
270-
"type": "null"
271-
}
272-
}
273-
},
274-
{
275-
"properties": {
276-
"type": {
277-
"const": "number"
278-
},
279-
"value": {
280-
"type": "number"
281-
}
282-
}
283-
},
284-
{
285-
"properties": {
286-
"type": {
287-
"const": "string"
288-
},
289-
"value": {
290-
"type": "string"
291-
}
292-
}
293246
}
294247
]
295248
},

test/tests/core.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"scenario": "Core syntax",
33
"description": "Test cases that do not depend on any registry definitions.",
4-
"defaultTestParams": {
4+
"defaultTestProperties": {
55
"testType": "syntax",
66
"locale": "en-US"
77
},

test/tests/data-model-errors.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"scenario": "Data model errors",
33
"description": "Each `src` should produce an error when processed. each test description indicates the error reason, but this text should not be asserted against. Error names are defined in the spec.",
4-
"defaultTestParams": {
4+
"defaultTestProperties": {
55
"testType": "syntax",
66
"locale": "en-US",
77
"expErrors": true

test/tests/functions/date.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"scenario": "Date functions",
33
"description": "The behaviour of built-in formatters is implementation-specific so the `exp` field is often omitted and assertions are made on error cases.",
4-
"defaultTestParams": {
4+
"defaultTestProperties": {
55
"testType": "function",
66
"locale": "en-US",
77
"expErrors": false

test/tests/functions/datetime.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"scenario": "Datetime functions",
33
"description": "The behaviour of built-in formatters is implementation-specific so the `exp` field is often omitted and assertions are made on error cases.",
4-
"defaultTestParams": {
4+
"defaultTestProperties": {
55
"testType": "function",
66
"locale": "en-US",
77
"expErrors": false

test/tests/functions/integer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"scenario": "Integer functions",
3-
"defaultTestParams": {
3+
"defaultTestProperties": {
44
"testType": "function",
55
"locale": "en-US"
66
},

test/tests/functions/number.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"scenario": "Number functions",
3-
"defaultTestParams": {
3+
"defaultTestProperties": {
44
"testType": "function",
55
"locale": "en-US"
66
},

test/tests/functions/string.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"scenario": "functions",
3-
"defaultTestParams": {
3+
"defaultTestProperties": {
44
"testType": "function",
55
"locale": "en-US"
66
},

test/tests/functions/time.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"scenario": "functions",
3-
"defaultTestParams": {
3+
"defaultTestProperties": {
44
"testType": "function",
55
"locale": "en-US",
66
"expErrors": false

test/tests/syntax-errors.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"scenario": "Syntax errors",
33
"description": "Strings that produce syntax errors when parsed.",
4-
"defaultTestParams": {
4+
"defaultTestProperties": {
55
"testType": "syntax",
66
"locale": "en-US",
77
"expErrors": true

0 commit comments

Comments
 (0)