Skip to content

Commit 21555a8

Browse files
authored
Merge pull request #431 from ChALkeR/chalker/enum
Add tests for objects in enum
2 parents 87550ad + a21e425 commit 21555a8

File tree

4 files changed

+40
-0
lines changed

4 files changed

+40
-0
lines changed

tests/draft2019-09/enum.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@
3333
"description": "objects are deep compared",
3434
"data": {"foo": false},
3535
"valid": false
36+
},
37+
{
38+
"description": "valid object matches",
39+
"data": {"foo": 12},
40+
"valid": true
41+
},
42+
{
43+
"description": "extra properties in object is invalid",
44+
"data": {"foo": 12, "boo": 42},
45+
"valid": false
3646
}
3747
]
3848
},

tests/draft4/enum.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@
3333
"description": "objects are deep compared",
3434
"data": {"foo": false},
3535
"valid": false
36+
},
37+
{
38+
"description": "valid object matches",
39+
"data": {"foo": 12},
40+
"valid": true
41+
},
42+
{
43+
"description": "extra properties in object is invalid",
44+
"data": {"foo": 12, "boo": 42},
45+
"valid": false
3646
}
3747
]
3848
},

tests/draft6/enum.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@
3333
"description": "objects are deep compared",
3434
"data": {"foo": false},
3535
"valid": false
36+
},
37+
{
38+
"description": "valid object matches",
39+
"data": {"foo": 12},
40+
"valid": true
41+
},
42+
{
43+
"description": "extra properties in object is invalid",
44+
"data": {"foo": 12, "boo": 42},
45+
"valid": false
3646
}
3747
]
3848
},

tests/draft7/enum.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@
3333
"description": "objects are deep compared",
3434
"data": {"foo": false},
3535
"valid": false
36+
},
37+
{
38+
"description": "valid object matches",
39+
"data": {"foo": 12},
40+
"valid": true
41+
},
42+
{
43+
"description": "extra properties in object is invalid",
44+
"data": {"foo": 12, "boo": 42},
45+
"valid": false
3646
}
3747
]
3848
},

0 commit comments

Comments
 (0)