Skip to content

Commit 7dfeda6

Browse files
committed
Add a set of additional checks for static values
1 parent 222f4f5 commit 7dfeda6

File tree

1 file changed

+103
-0
lines changed

1 file changed

+103
-0
lines changed

suites/iterators.extra.json

+103
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,108 @@
100100
"rule": { "!==": { "preserve": [1,2,3] } },
101101
"data": null,
102102
"error": { "type": "Invalid Arguments" }
103+
},
104+
"Any of the operators listed when called with a non-array argument, will throw",
105+
{
106+
"description": "if with static non-array argument throws",
107+
"rule": { "if": 5 },
108+
"data": null,
109+
"error": { "type": "Invalid Arguments" }
110+
},
111+
{
112+
"description": "or with static non-array argument throws",
113+
"rule": { "or": 5 },
114+
"data": null,
115+
"error": { "type": "Invalid Arguments" }
116+
},
117+
{
118+
"description": "and with static non-array argument throws",
119+
"rule": { "and": 5 },
120+
"data": null,
121+
"error": { "type": "Invalid Arguments" }
122+
},
123+
{
124+
"description": "map with static non-array argument throws",
125+
"rule": { "map": 5 },
126+
"data": null,
127+
"error": { "type": "Invalid Arguments" }
128+
},
129+
{
130+
"description": "filter with static non-array argument throws",
131+
"rule": { "filter": 5 },
132+
"data": null,
133+
"error": { "type": "Invalid Arguments" }
134+
},
135+
{
136+
"description": "reduce with static non-array argument throws",
137+
"rule": { "reduce": 5 },
138+
"data": null,
139+
"error": { "type": "Invalid Arguments" }
140+
},
141+
{
142+
"description": "some with static non-array argument throws",
143+
"rule": { "some": 5 },
144+
"data": null,
145+
"error": { "type": "Invalid Arguments" }
146+
},
147+
{
148+
"description": "all with static non-array argument throws",
149+
"rule": { "all": 5 },
150+
"data": null,
151+
"error": { "type": "Invalid Arguments" }
152+
},
153+
{
154+
"description": "none with static non-array argument throws",
155+
"rule": { "none": 5 },
156+
"data": null,
157+
"error": { "type": "Invalid Arguments" }
158+
},
159+
{
160+
"description": "< with static non-array argument throws",
161+
"rule": { "<": 5 },
162+
"data": null,
163+
"error": { "type": "Invalid Arguments" }
164+
},
165+
{
166+
"description": "<= with static non-array argument throws",
167+
"rule": { "<=": 5 },
168+
"data": null,
169+
"error": { "type": "Invalid Arguments" }
170+
},
171+
{
172+
"description": "> with static non-array argument throws",
173+
"rule": { ">": 5 },
174+
"data": null,
175+
"error": { "type": "Invalid Arguments" }
176+
},
177+
{
178+
"description": ">= with static non-array argument throws",
179+
"rule": { ">=": 5 },
180+
"data": null,
181+
"error": { "type": "Invalid Arguments" }
182+
},
183+
{
184+
"description": "== with static non-array argument throws",
185+
"rule": { "==": 5 },
186+
"data": null,
187+
"error": { "type": "Invalid Arguments" }
188+
},
189+
{
190+
"description": "!= with static non-array argument throws",
191+
"rule": { "!=": 5 },
192+
"data": null,
193+
"error": { "type": "Invalid Arguments" }
194+
},
195+
{
196+
"description": "=== with static non-array argument throws",
197+
"rule": { "===": 5 },
198+
"data": null,
199+
"error": { "type": "Invalid Arguments" }
200+
},
201+
{
202+
"description": "!== with static non-array argument throws",
203+
"rule": { "!==": 5 },
204+
"data": null,
205+
"error": { "type": "Invalid Arguments" }
103206
}
104207
]

0 commit comments

Comments
 (0)