Skip to content

Commit 9d5909a

Browse files
committed
Also check string "1" is not a number in draft 4
1 parent e4ab5bd commit 9d5909a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/draft4/type.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
"data": "foo",
1919
"valid": false
2020
},
21+
{
22+
"description": "a string is still not an integer, even if it looks like one",
23+
"data": "1",
24+
"valid": false
25+
},
2126
{
2227
"description": "an object is not an integer",
2328
"data": {},
@@ -59,6 +64,11 @@
5964
"data": "foo",
6065
"valid": false
6166
},
67+
{
68+
"description": "a string is still not a number, even if it looks like one",
69+
"data": "1",
70+
"valid": false
71+
},
6272
{
6373
"description": "an object is not a number",
6474
"data": {},
@@ -100,6 +110,11 @@
100110
"data": "foo",
101111
"valid": true
102112
},
113+
{
114+
"description": "a string is still a string, even if it looks like a number",
115+
"data": "1",
116+
"valid": true
117+
},
103118
{
104119
"description": "an object is not a string",
105120
"data": {},

0 commit comments

Comments
 (0)