Skip to content

Commit

Permalink
(fix) count vows properly, by skipping 'topic' keys
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhead committed May 16, 2010
1 parent 6454351 commit 1cb886c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/vows.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,10 @@ function addVows(tests) {
(function count(tests) {
var match = false;
remaining++;
Object.keys(tests).forEach(function (key) {
if (typeof(tests[key]) === "object" && !Array.isArray(tests[key])) {
Object.keys(tests).filter(function (k) {
return k !== 'topic';
}).forEach(function (key) {
if (typeof(tests[key]) === "object") {
if (! (match = count(tests[key]) ||
match || vows.options.matcher.test(key))) {
delete tests[key];
Expand Down

0 comments on commit 1cb886c

Please sign in to comment.