Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Don't call runSuite on just anything, only objects #185

Open
wants to merge 1 commit into from

1 participant

@Floby

Check that we're calling runSuite on an object when prop is not a function.

This caused a bug when running my tests on node-libspotify. I Couldn't track exactly why this function was called with undefined in the first place, but this fixed it and seemed appropriate.

Thanks for this framework by the way :)

@Floby Floby Don't call runSuite on just anything, only objects
Check that we're calling runSuite on an object when prop is not a function
b550dc7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 23, 2012
  1. @Floby

    Don't call runSuite on just anything, only objects

    Floby authored
    Check that we're calling runSuite on an object when prop is not a function
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/core.js
View
2  lib/core.js
@@ -120,7 +120,7 @@ exports.runSuite = function (name, suite, opt, callback) {
return cb();
}
}
- else {
+ else if(typeof prop == 'object') {
exports.runSuite(_name, suite[k], opt, cb);
}
}, callback);
Something went wrong with that request. Please try again.