Version 1
[yaffs-website] / node_modules / is-my-json-valid / test / json-schema-draft4 / maxItems.json
diff --git a/node_modules/is-my-json-valid/test/json-schema-draft4/maxItems.json b/node_modules/is-my-json-valid/test/json-schema-draft4/maxItems.json
new file mode 100644 (file)
index 0000000..3b53a6b
--- /dev/null
@@ -0,0 +1,28 @@
+[
+    {
+        "description": "maxItems validation",
+        "schema": {"maxItems": 2},
+        "tests": [
+            {
+                "description": "shorter is valid",
+                "data": [1],
+                "valid": true
+            },
+            {
+                "description": "exact length is valid",
+                "data": [1, 2],
+                "valid": true
+            },
+            {
+                "description": "too long is invalid",
+                "data": [1, 2, 3],
+                "valid": false
+            },
+            {
+                "description": "ignores non-arrays",
+                "data": "foobar",
+                "valid": true
+            }
+        ]
+    }
+]