Skip to content

Commit e7fb5f0

Browse files
authored
Test suite: Add $schema to scenarios, drop expCleanSrc (#827)
* Add $schema property * Drop expCleanSrc * Drop test/.vscode/settings.json
1 parent b48f7ac commit e7fb5f0

File tree

11 files changed

+15
-33
lines changed

11 files changed

+15
-33
lines changed

test/.vscode/settings.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

test/schemas/v0/tests.schema.json

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
"tests"
1010
],
1111
"properties": {
12+
"$schema": {
13+
"type": "string",
14+
"description": "Identifier for the test file JSON schema."
15+
},
1216
"scenario": {
1317
"type": "string",
1418
"description": "Identifier for the tests in the file."
@@ -120,9 +124,6 @@
120124
"exp": {
121125
"$ref": "#/$defs/exp"
122126
},
123-
"expCleanSrc": {
124-
"$ref": "#/$defs/expCleanSrc"
125-
},
126127
"expParts": {
127128
"$ref": "#/$defs/expParts"
128129
},
@@ -151,9 +152,6 @@
151152
"exp": {
152153
"$ref": "#/$defs/exp"
153154
},
154-
"expCleanSrc": {
155-
"$ref": "#/$defs/expCleanSrc"
156-
},
157155
"expParts": {
158156
"$ref": "#/$defs/expParts"
159157
},
@@ -223,10 +221,6 @@
223221
"description": "The expected result of formatting the message to a string.",
224222
"type": "string"
225223
},
226-
"expCleanSrc": {
227-
"description": "The expected normalized form of `src`, for testing stringifiers.",
228-
"type": "string"
229-
},
230224
"expParts": {
231225
"description": "The expected result of formatting the message to parts.",
232226
"type": "array",
@@ -368,11 +362,6 @@
368362
"exp"
369363
]
370364
},
371-
{
372-
"required": [
373-
"expCleanSrc"
374-
]
375-
},
376365
{
377366
"required": [
378367
"expParts"

test/tests/data-model-errors.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://raw.githubusercontent.com/unicode-org/message-format-wg/main/test/schemas/v0/tests.schema.json",
23
"scenario": "Data model errors",
34
"defaultTestProperties": {
45
"locale": "en-US"

test/tests/functions/date.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://raw.githubusercontent.com/unicode-org/message-format-wg/main/test/schemas/v0/tests.schema.json",
23
"scenario": "Date function",
34
"description": "The built-in formatter for dates.",
45
"defaultTestProperties": {

test/tests/functions/datetime.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://raw.githubusercontent.com/unicode-org/message-format-wg/main/test/schemas/v0/tests.schema.json",
23
"scenario": "Datetime function",
34
"description": "The built-in formatter for datetimes.",
45
"defaultTestProperties": {

test/tests/functions/integer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://raw.githubusercontent.com/unicode-org/message-format-wg/main/test/schemas/v0/tests.schema.json",
23
"scenario": "Integer function",
34
"description": "The built-in formatter for integers.",
45
"defaultTestProperties": {

test/tests/functions/number.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://raw.githubusercontent.com/unicode-org/message-format-wg/main/test/schemas/v0/tests.schema.json",
23
"scenario": "Number function",
34
"description": "The built-in formatter for numbers.",
45
"defaultTestProperties": {

test/tests/functions/string.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://raw.githubusercontent.com/unicode-org/message-format-wg/main/test/schemas/v0/tests.schema.json",
23
"scenario": "String function",
34
"description": "The built-in formatter for strings.",
45
"defaultTestProperties": {

test/tests/functions/time.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://raw.githubusercontent.com/unicode-org/message-format-wg/main/test/schemas/v0/tests.schema.json",
23
"scenario": "Time function",
34
"description": "The built-in formatter for times.",
45
"defaultTestProperties": {

test/tests/syntax-errors.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://raw.githubusercontent.com/unicode-org/message-format-wg/main/test/schemas/v0/tests.schema.json",
23
"scenario": "Syntax errors",
34
"description": "Strings that produce syntax errors when parsed.",
45
"defaultTestProperties": {

0 commit comments

Comments
 (0)