Skip to content

Commit 1cb886c

Browse files
author
cloudhead
committed
(fix) count vows properly, by skipping 'topic' keys
1 parent 6454351 commit 1cb886c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/vows.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,10 @@ function addVows(tests) {
172172
(function count(tests) {
173173
var match = false;
174174
remaining++;
175-
Object.keys(tests).forEach(function (key) {
176-
if (typeof(tests[key]) === "object" && !Array.isArray(tests[key])) {
175+
Object.keys(tests).filter(function (k) {
176+
return k !== 'topic';
177+
}).forEach(function (key) {
178+
if (typeof(tests[key]) === "object") {
177179
if (! (match = count(tests[key]) ||
178180
match || vows.options.matcher.test(key))) {
179181
delete tests[key];

0 commit comments

Comments
 (0)