Skip to content

Commit baf0502

Browse files
committed
Added items tests.
1 parent cb6dfb2 commit baf0502

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

tests/draft3/items.json

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
[
2+
{
3+
"description": "a schema given for items",
4+
"schema": {
5+
"items": {"type": "integer"}
6+
},
7+
"tests": [
8+
{
9+
"description": "valid items",
10+
"data": [ 1, 2, 3 ],
11+
"valid": true
12+
},
13+
{
14+
"description": "wrong type of items",
15+
"data": [1, "x"],
16+
"valid": false
17+
}
18+
]
19+
},
20+
{
21+
"description": "an array of schemas for items",
22+
"schema": {
23+
"items": [
24+
{"type": "integer"},
25+
{"type": "string"}
26+
]
27+
},
28+
"tests": [
29+
{
30+
"description": "correct types",
31+
"data": [ 1, "foo" ],
32+
"valid": true
33+
},
34+
{
35+
"description": "wrong types",
36+
"data": [ "foo", 1 ],
37+
"valid": false
38+
}
39+
]
40+
}
41+
]

0 commit comments

Comments
 (0)