-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for arrays #6
Comments
Yeah, the idea sounds good. It requires also to think how should look rules for test cases generation feature. |
It doesen't really matter. I don't think people will mix them up, and even if they do, that would make sense for them to check When multiplying values via QUnit
.cases([
{ a : 1 },
[1, 2, 3],
])
.combinatorial([
["one", "two", "three"],
null,
{ b : "null" }
]) Produces test cases: [
{ title : "case1 mix1", a : 1, array2: ["one", "two", "three"] },
{ title : "case1 mix2", a : 1 },
{ title : "case1 mix3", a : 1, b: "null" },
{ title : "case2 mix1", array1 : [1,2,3], array2: ["one", "two", "three"] },
{ title : "case2 mix2", array1 : [1,2,3] },
{ title : "case2 mix3", array1 : [1,2,3], b: "null" },
] |
Ok, that sounds reasonable. Just instead of properties array1, array2, etc. I think we'd better had an array of arrays. [
{ title : "case1 mix1", a : 1, arrays : [undefined, ["one", "two", "three"]] },
{ title : "case1 mix2", a : 1 },
{ title : "case1 mix3", a : 1, b: "null" },
{ title : "case2 mix1", arrays : [[1,2,3], ["one", "two", "three"]] },
{ title : "case2 mix2", arrays : [[1,2,3]] },
{ title : "case2 mix3", arrays : [[1,2,3]], b: "null" },
] or something similar... |
Makes sense. I think mixing arrays with objects is not the most util part, however, mixing arrays altogether is where the power comes along. |
So that the following would be possible too:
The text was updated successfully, but these errors were encountered: