Commit a56aadfe a56aadfef896b0768c34f891144db1cf31300f86 by Nicolas Perriault

added a supplementary type check to Casper#createStep()

1 parent f1502845
......@@ -235,6 +235,9 @@
* @return Function The final step function
*/
createStep: function(fn, options) {
if (!isType(fn, "function")) {
throw "createStep(): a step definition must be a function";
}
fn.options = isType(options, "object") ? options : {};
return fn;
},
......