Skip to content

Commit 72a32fe

Browse files
Merge pull request #468 from json-schema-org/ether/combine-test-cases
these test cases can be combined since the schemas are the same
2 parents 0c48ffb + 76a4ba0 commit 72a32fe

File tree

5 files changed

+10
-42
lines changed

5 files changed

+10
-42
lines changed

tests/draft2019-09/defs.json

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
[
22
{
3-
"description": "valid definition",
3+
"description": "validate definition against metaschema",
44
"schema": {"$ref": "https://json-schema.org/draft/2019-09/schema"},
55
"tests": [
66
{
77
"description": "valid definition schema",
88
"data": {"$defs": {"foo": {"type": "integer"}}},
99
"valid": true
10-
}
11-
]
12-
},
13-
{
14-
"description": "invalid definition",
15-
"schema": {"$ref": "https://json-schema.org/draft/2019-09/schema"},
16-
"tests": [
10+
},
1711
{
1812
"description": "invalid definition schema",
1913
"data": {"$defs": {"foo": {"type": 1}}},

tests/draft2020-12/defs.json

+2-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[
22
{
3-
"description": "valid definition",
3+
"description": "validate definition against metaschema",
44
"schema": {
55
"$ref": "https://json-schema.org/draft/2020-12/schema"
66
},
@@ -9,15 +9,7 @@
99
"description": "valid definition schema",
1010
"data": {"$defs": {"foo": {"type": "integer"}}},
1111
"valid": true
12-
}
13-
]
14-
},
15-
{
16-
"description": "invalid definition",
17-
"schema": {
18-
"$ref": "https://json-schema.org/draft/2020-12/schema"
19-
},
20-
"tests": [
12+
},
2113
{
2214
"description": "invalid definition schema",
2315
"data": {"$defs": {"foo": {"type": 1}}},

tests/draft4/definitions.json

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[
22
{
3-
"description": "valid definition",
3+
"description": "validate definition against metaschema",
44
"schema": {"$ref": "http://json-schema.org/draft-04/schema#"},
55
"tests": [
66
{
@@ -11,13 +11,7 @@
1111
}
1212
},
1313
"valid": true
14-
}
15-
]
16-
},
17-
{
18-
"description": "invalid definition",
19-
"schema": {"$ref": "http://json-schema.org/draft-04/schema#"},
20-
"tests": [
14+
},
2115
{
2216
"description": "invalid definition schema",
2317
"data": {

tests/draft6/definitions.json

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[
22
{
3-
"description": "valid definition",
3+
"description": "validate definition against metaschema",
44
"schema": {"$ref": "http://json-schema.org/draft-06/schema#"},
55
"tests": [
66
{
@@ -11,13 +11,7 @@
1111
}
1212
},
1313
"valid": true
14-
}
15-
]
16-
},
17-
{
18-
"description": "invalid definition",
19-
"schema": {"$ref": "http://json-schema.org/draft-06/schema#"},
20-
"tests": [
14+
},
2115
{
2216
"description": "invalid definition schema",
2317
"data": {

tests/draft7/definitions.json

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[
22
{
3-
"description": "valid definition",
3+
"description": "validate definition against metaschema",
44
"schema": {"$ref": "http://json-schema.org/draft-07/schema#"},
55
"tests": [
66
{
@@ -11,13 +11,7 @@
1111
}
1212
},
1313
"valid": true
14-
}
15-
]
16-
},
17-
{
18-
"description": "invalid definition",
19-
"schema": {"$ref": "http://json-schema.org/draft-07/schema#"},
20-
"tests": [
14+
},
2115
{
2216
"description": "invalid definition schema",
2317
"data": {

0 commit comments

Comments
 (0)