Skip to content

Commit 94d5043

Browse files
add non-string uri tests
1 parent 31796b3 commit 94d5043

File tree

6 files changed

+180
-0
lines changed

6 files changed

+180
-0
lines changed

tests/draft-next/optional/format/uri.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,36 @@
66
"format": "uri"
77
},
88
"tests": [
9+
{
10+
"description": "all string formats ignore integers",
11+
"data": 12,
12+
"valid": true
13+
},
14+
{
15+
"description": "all string formats ignore floats",
16+
"data": 13.7,
17+
"valid": true
18+
},
19+
{
20+
"description": "all string formats ignore objects",
21+
"data": {},
22+
"valid": true
23+
},
24+
{
25+
"description": "all string formats ignore arrays",
26+
"data": [],
27+
"valid": true
28+
},
29+
{
30+
"description": "all string formats ignore booleans",
31+
"data": false,
32+
"valid": true
33+
},
34+
{
35+
"description": "all string formats ignore nulls",
36+
"data": null,
37+
"valid": true
38+
},
939
{
1040
"description": "a valid URL with anchor tag",
1141
"data": "http://foo.bar/?baz=qux#quux",

tests/draft2019-09/optional/format/uri.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,36 @@
66
"format": "uri"
77
},
88
"tests": [
9+
{
10+
"description": "all string formats ignore integers",
11+
"data": 12,
12+
"valid": true
13+
},
14+
{
15+
"description": "all string formats ignore floats",
16+
"data": 13.7,
17+
"valid": true
18+
},
19+
{
20+
"description": "all string formats ignore objects",
21+
"data": {},
22+
"valid": true
23+
},
24+
{
25+
"description": "all string formats ignore arrays",
26+
"data": [],
27+
"valid": true
28+
},
29+
{
30+
"description": "all string formats ignore booleans",
31+
"data": false,
32+
"valid": true
33+
},
34+
{
35+
"description": "all string formats ignore nulls",
36+
"data": null,
37+
"valid": true
38+
},
939
{
1040
"description": "a valid URL with anchor tag",
1141
"data": "http://foo.bar/?baz=qux#quux",

tests/draft2020-12/optional/format/uri.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,36 @@
66
"format": "uri"
77
},
88
"tests": [
9+
{
10+
"description": "all string formats ignore integers",
11+
"data": 12,
12+
"valid": true
13+
},
14+
{
15+
"description": "all string formats ignore floats",
16+
"data": 13.7,
17+
"valid": true
18+
},
19+
{
20+
"description": "all string formats ignore objects",
21+
"data": {},
22+
"valid": true
23+
},
24+
{
25+
"description": "all string formats ignore arrays",
26+
"data": [],
27+
"valid": true
28+
},
29+
{
30+
"description": "all string formats ignore booleans",
31+
"data": false,
32+
"valid": true
33+
},
34+
{
35+
"description": "all string formats ignore nulls",
36+
"data": null,
37+
"valid": true
38+
},
939
{
1040
"description": "a valid URL with anchor tag",
1141
"data": "http://foo.bar/?baz=qux#quux",

tests/draft4/optional/format/uri.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,36 @@
33
"description": "validation of URIs",
44
"schema": { "format": "uri" },
55
"tests": [
6+
{
7+
"description": "all string formats ignore integers",
8+
"data": 12,
9+
"valid": true
10+
},
11+
{
12+
"description": "all string formats ignore floats",
13+
"data": 13.7,
14+
"valid": true
15+
},
16+
{
17+
"description": "all string formats ignore objects",
18+
"data": {},
19+
"valid": true
20+
},
21+
{
22+
"description": "all string formats ignore arrays",
23+
"data": [],
24+
"valid": true
25+
},
26+
{
27+
"description": "all string formats ignore booleans",
28+
"data": false,
29+
"valid": true
30+
},
31+
{
32+
"description": "all string formats ignore nulls",
33+
"data": null,
34+
"valid": true
35+
},
636
{
737
"description": "a valid URL with anchor tag",
838
"data": "http://foo.bar/?baz=qux#quux",

tests/draft6/optional/format/uri.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,36 @@
33
"description": "validation of URIs",
44
"schema": { "format": "uri" },
55
"tests": [
6+
{
7+
"description": "all string formats ignore integers",
8+
"data": 12,
9+
"valid": true
10+
},
11+
{
12+
"description": "all string formats ignore floats",
13+
"data": 13.7,
14+
"valid": true
15+
},
16+
{
17+
"description": "all string formats ignore objects",
18+
"data": {},
19+
"valid": true
20+
},
21+
{
22+
"description": "all string formats ignore arrays",
23+
"data": [],
24+
"valid": true
25+
},
26+
{
27+
"description": "all string formats ignore booleans",
28+
"data": false,
29+
"valid": true
30+
},
31+
{
32+
"description": "all string formats ignore nulls",
33+
"data": null,
34+
"valid": true
35+
},
636
{
737
"description": "a valid URL with anchor tag",
838
"data": "http://foo.bar/?baz=qux#quux",

tests/draft7/optional/format/uri.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,36 @@
33
"description": "validation of URIs",
44
"schema": { "format": "uri" },
55
"tests": [
6+
{
7+
"description": "all string formats ignore integers",
8+
"data": 12,
9+
"valid": true
10+
},
11+
{
12+
"description": "all string formats ignore floats",
13+
"data": 13.7,
14+
"valid": true
15+
},
16+
{
17+
"description": "all string formats ignore objects",
18+
"data": {},
19+
"valid": true
20+
},
21+
{
22+
"description": "all string formats ignore arrays",
23+
"data": [],
24+
"valid": true
25+
},
26+
{
27+
"description": "all string formats ignore booleans",
28+
"data": false,
29+
"valid": true
30+
},
31+
{
32+
"description": "all string formats ignore nulls",
33+
"data": null,
34+
"valid": true
35+
},
636
{
737
"description": "a valid URL with anchor tag",
838
"data": "http://foo.bar/?baz=qux#quux",

0 commit comments

Comments
 (0)