Skip to content

Commit 2c53688

Browse files
committed
Add tests instead of modifying existing tests
1 parent de84a59 commit 2c53688

File tree

7 files changed

+77
-7
lines changed

7 files changed

+77
-7
lines changed

tests/draft-next/uniqueItems.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@
55
"tests": [
66
{
77
"description": "unique array of integers is valid",
8-
"data": [1, 2, 3],
8+
"data": [1, 2],
99
"valid": true
1010
},
1111
{
1212
"description": "non-unique array of integers is invalid",
13+
"data": [1, 1],
14+
"valid": false
15+
},
16+
{
17+
"description": "non-unique array of more than two integers is invalid",
1318
"data": [1, 2, 1],
1419
"valid": false
1520
},
@@ -71,6 +76,11 @@
7176
},
7277
{
7378
"description": "non-unique array of arrays is invalid",
79+
"data": [["foo"], ["foo"]],
80+
"valid": false
81+
},
82+
{
83+
"description": "non-unique array of more than two arrays is invalid",
7484
"data": [["foo"], ["bar"], ["foo"]],
7585
"valid": false
7686
},

tests/draft2019-09/uniqueItems.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@
55
"tests": [
66
{
77
"description": "unique array of integers is valid",
8-
"data": [1, 2, 3],
8+
"data": [1, 2],
99
"valid": true
1010
},
1111
{
1212
"description": "non-unique array of integers is invalid",
13+
"data": [1, 1],
14+
"valid": false
15+
},
16+
{
17+
"description": "non-unique array of more than two integers is invalid",
1318
"data": [1, 2, 1],
1419
"valid": false
1520
},
@@ -71,6 +76,11 @@
7176
},
7277
{
7378
"description": "non-unique array of arrays is invalid",
79+
"data": [["foo"], ["foo"]],
80+
"valid": false
81+
},
82+
{
83+
"description": "non-unique array of more than two arrays is invalid",
7484
"data": [["foo"], ["bar"], ["foo"]],
7585
"valid": false
7686
},

tests/draft2020-12/uniqueItems.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@
55
"tests": [
66
{
77
"description": "unique array of integers is valid",
8-
"data": [1, 2, 3],
8+
"data": [1, 2],
99
"valid": true
1010
},
1111
{
1212
"description": "non-unique array of integers is invalid",
13+
"data": [1, 1],
14+
"valid": false
15+
},
16+
{
17+
"description": "non-unique array of more than two integers is invalid",
1318
"data": [1, 2, 1],
1419
"valid": false
1520
},
@@ -71,6 +76,11 @@
7176
},
7277
{
7378
"description": "non-unique array of arrays is invalid",
79+
"data": [["foo"], ["foo"]],
80+
"valid": false
81+
},
82+
{
83+
"description": "non-unique array of more than two arrays is invalid",
7484
"data": [["foo"], ["bar"], ["foo"]],
7585
"valid": false
7686
},

tests/draft3/uniqueItems.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@
55
"tests": [
66
{
77
"description": "unique array of integers is valid",
8-
"data": [1, 2, 3],
8+
"data": [1, 2],
99
"valid": true
1010
},
1111
{
1212
"description": "non-unique array of integers is invalid",
13+
"data": [1, 1],
14+
"valid": false
15+
},
16+
{
17+
"description": "non-unique array of more than two integers is invalid",
1318
"data": [1, 2, 1],
1419
"valid": false
1520
},
@@ -61,6 +66,11 @@
6166
},
6267
{
6368
"description": "non-unique array of arrays is invalid",
69+
"data": [["foo"], ["foo"]],
70+
"valid": false
71+
},
72+
{
73+
"description": "non-unique array of more than two arrays is invalid",
6474
"data": [["foo"], ["bar"], ["foo"]],
6575
"valid": false
6676
},

tests/draft4/uniqueItems.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@
55
"tests": [
66
{
77
"description": "unique array of integers is valid",
8-
"data": [1, 2, 3],
8+
"data": [1, 2],
99
"valid": true
1010
},
1111
{
1212
"description": "non-unique array of integers is invalid",
13+
"data": [1, 1],
14+
"valid": false
15+
},
16+
{
17+
"description": "non-unique array of more than two integers is invalid",
1318
"data": [1, 2, 1],
1419
"valid": false
1520
},
@@ -71,6 +76,11 @@
7176
},
7277
{
7378
"description": "non-unique array of arrays is invalid",
79+
"data": [["foo"], ["foo"]],
80+
"valid": false
81+
},
82+
{
83+
"description": "non-unique array of more than two arrays is invalid",
7484
"data": [["foo"], ["bar"], ["foo"]],
7585
"valid": false
7686
},

tests/draft6/uniqueItems.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@
55
"tests": [
66
{
77
"description": "unique array of integers is valid",
8-
"data": [1, 2, 3],
8+
"data": [1, 2],
99
"valid": true
1010
},
1111
{
1212
"description": "non-unique array of integers is invalid",
13+
"data": [1, 1],
14+
"valid": false
15+
},
16+
{
17+
"description": "non-unique array of more than two integers is invalid",
1318
"data": [1, 2, 1],
1419
"valid": false
1520
},
@@ -71,6 +76,11 @@
7176
},
7277
{
7378
"description": "non-unique array of arrays is invalid",
79+
"data": [["foo"], ["foo"]],
80+
"valid": false
81+
},
82+
{
83+
"description": "non-unique array of more than two arrays is invalid",
7484
"data": [["foo"], ["bar"], ["foo"]],
7585
"valid": false
7686
},

tests/draft7/uniqueItems.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@
55
"tests": [
66
{
77
"description": "unique array of integers is valid",
8-
"data": [1, 2, 3],
8+
"data": [1, 2],
99
"valid": true
1010
},
1111
{
1212
"description": "non-unique array of integers is invalid",
13+
"data": [1, 1],
14+
"valid": false
15+
},
16+
{
17+
"description": "non-unique array of more than two integers is invalid",
1318
"data": [1, 2, 1],
1419
"valid": false
1520
},
@@ -71,6 +76,11 @@
7176
},
7277
{
7378
"description": "non-unique array of arrays is invalid",
79+
"data": [["foo"], ["foo"]],
80+
"valid": false
81+
},
82+
{
83+
"description": "non-unique array of more than two arrays is invalid",
7484
"data": [["foo"], ["bar"], ["foo"]],
7585
"valid": false
7686
},

0 commit comments

Comments
 (0)