Skip to content

Commit a3aa215

Browse files
committed
Only traverse if specs[key] is an object, can blow up on Object.keys otherwise
1 parent 345d39d commit a3aa215

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/specs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function buildTest(metric, spec, actual, defaults) {
9191
result = actual === expected;
9292
operation = 'equal to';
9393
}
94-
94+
9595
// result
9696
text = text
9797
.replace('{metric}', metric)
@@ -125,7 +125,7 @@ function specsRunner(specs, reporter, callback, err, data) {
125125
path.pop();
126126
return;
127127
}
128-
if (typeof data[key] === 'object') {
128+
if (typeof specs[key] === 'object') {
129129
traverse(specs[key], data[key]);
130130
} else {
131131
tests.push(buildTest(path.join('.'), specs[key], data[key], defaults));

0 commit comments

Comments
 (0)