Skip to content

Commit fc6cee5

Browse files
committed
propertyDependencies non-string property value tests
1 parent 99f3b60 commit fc6cee5

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

tests/draft-next/propertyDependencies.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,46 @@
3939
}
4040
]
4141
},
42+
{
43+
"description": "propertyDependencies doesn't act on non-string property values",
44+
"schema": {
45+
"propertyDependencies": {
46+
"foo": {"bar": false}
47+
}
48+
},
49+
"tests": [
50+
{
51+
"description": "ignores booleans",
52+
"data": {"foo": false},
53+
"valid": true
54+
},
55+
{
56+
"description": "ignores integers",
57+
"data": {"foo": 2},
58+
"valid": true
59+
},
60+
{
61+
"description": "ignores floats",
62+
"data": {"foo": 1.1},
63+
"valid": true
64+
},
65+
{
66+
"description": "ignores objects",
67+
"data": {"foo": {}},
68+
"valid": true
69+
},
70+
{
71+
"description": "ignores arrays",
72+
"data": {"foo": []},
73+
"valid": true
74+
},
75+
{
76+
"description": "ignores null",
77+
"data": {"foo": null},
78+
"valid": true
79+
}
80+
]
81+
},
4282
{
4383
"description": "disallowing values",
4484
"schema": {

0 commit comments

Comments
 (0)