Proposal: descriptive (non-value) but distinct names for tests
It's great that we can use ${value} inside test names, but sometimes value isn't a very descriptive name for a test. To get around this, I often write tests like this:
itParam('${value[0]}', [
[ 'descriptive name for a', a ],
[ 'descriptive name for b', b ]
], function([, value ]) {
// ...
})
This works absolutely fine, but isn't very pleasing to the eyes. Therefore, I propose to add the following "shorthand" syntax:
itParam([
[ 'descriptive name for a', a ],
[ 'descriptive name for b', b ]
], function(value) { // notice the lack of an ugly destructing operator
// ...
})
The lack of a name parameter would signal itParam to use the first element of each "data element" as testname, and only pass the second to the callback.
Just like #15 this might introduce parsing difficulties, although I think it's easier to differentiate between a string or array as the first parameter.
To avoid this complication the syntax could be changed to something like this:
itParam.named([
[ 'descriptive name for a', a ],
[ 'descriptive name for b', b ]
], function(value) {
// ...
})
We could even eliminate the inner-arrays like so:
itParam.named([
'descriptive name for a', a,
'descriptive name for b', b
], function(value) {
// ...
})
And "split" the arguments into groups of two. However, I think this can't be done type-safely (in the context of TypeScript), so this wouldn't be my preferred option.