Permalink
Browse files

(fix) count vows properly, by skipping 'topic' keys

  • Loading branch information...
1 parent 6454351 commit 1cb886c327a401e292098605de620678ccfdee58 cloudhead committed May 16, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/vows.js
View
6 lib/vows.js
@@ -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];

0 comments on commit 1cb886c

Please sign in to comment.