Skip to content
Snippets Groups Projects
Commit 8fe5581a authored by Alvaro Cabrera's avatar Alvaro Cabrera
Browse files

Ensure generated format for integers

parent 8af77d53
Branches
Tags
No related merge requests found
[
{
"description": "generated number values",
"description": "generated integer values",
"tests": [
{
"description": "should handle minimum",
......@@ -8,6 +8,8 @@
"type": "integer",
"minimum": 10
},
"hasNot": ".",
"type": "number",
"valid": true
},
{
......@@ -17,6 +19,8 @@
"minimum": 20,
"maximum": 30
},
"hasNot": ".",
"type": "number",
"valid": true
},
{
......@@ -27,6 +31,8 @@
"maximum": 50,
"multipleOf": 6
},
"hasNot": ".",
"type": "number",
"valid": true
},
{
......@@ -38,6 +44,8 @@
"multipleOf": 7,
"exclusiveMinimum": true
},
"hasNot": ".",
"type": "number",
"valid": true
},
{
......@@ -50,6 +58,8 @@
"exclusiveMinimum": true,
"exclusiveMaximum": true
},
"hasNot": ".",
"type": "number",
"valid": true
},
{
......
......@@ -44,6 +44,9 @@ glob.sync("#{__dirname}/**/*.json").forEach (file) ->
error = e.message
throw e unless test.throws
if test.hasNot
expect(sample.toString()).not.toContain test.hasNot
if test.type
expect(sample).toHaveType test.type
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment