Skip to content

Commit c28f433

Browse files
committed
Handle the "requests": [number] example from the documentation, if spec is a number, but data is an array, compare with length
1 parent a3aa215 commit c28f433

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/specs.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ function specsRunner(specs, reporter, callback, err, data) {
127127
}
128128
if (typeof specs[key] === 'object') {
129129
traverse(specs[key], data[key]);
130+
} else if(typeof specs[key] === 'number' && Array.isArray(data[key])) {
131+
tests.push(buildTest(path.join('.'), specs[key], data[key].length, defaults));
132+
path.pop();
130133
} else {
131134
tests.push(buildTest(path.join('.'), specs[key], data[key], defaults));
132135
path.pop();

0 commit comments

Comments
 (0)