diff --git a/lib/vows.js b/lib/vows.js index b8390ae..e68d5ec 100644 --- a/lib/vows.js +++ b/lib/vows.js @@ -75,7 +75,7 @@ function addVow(/* description & callback */) { // Sometimes it might be nicer to pass the proof first, // and the description second, so we let the user choose // the order. - if (args[0] instanceof Function) { + if (typeof(args[0]) === "function") { vow.callback = args[0], vow.description = args[1]; } else { vow.callback = args[1], vow.description = args[0]; @@ -302,7 +302,7 @@ vows.tell = function (topic, tests) { // setup fires. // If we encounter an object literal, we recurse, sending it // our current context. - if (vow.callback instanceof Function) { + if (typeof(vow.callback) === 'function') { setup.addVow(vow); } else if (typeof(vow.callback) === 'object' && ! Array.isArray(vow.callback)) { // If there's a setup stage, we have to wait for it to fire,