Commit a56aadfe a56aadfef896b0768c34f891144db1cf31300f86 by Nicolas Perriault

added a supplementary type check to Casper#createStep()

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