[hotfix] Ignore type checking for edge
[platform/framework/web/wrtjs.git] / device_home / node_modules / jake / test / integration / helpers.js
1 var exec=require("child_process").exec,helpers=new function(){var e,r,t,n=[],i=function(){(r=n.shift())?(console.log("Running "+r),e[r]()):t()};this.exec=function(){for(var e,r,t=Array.prototype.slice.call(arguments),n=t.shift(),i={};e=t.shift();)"function"==typeof e?r=e:i=e;n+=" --trace";var c=i.execOpts?i.execOpts:{};exec(n,c,(function(e,t,n){var c=helpers.trim(t);if(e){if(!1===i.breakOnError)return r(e);throw e}r(n||c)}))},this.trim=function(e){return(e||"").replace(/^\s*|\s*$/g,"")},this.parse=function(e){var r=e||"";return r=(r=helpers.trim(r)).replace(/'/g,'"'),JSON.parse(r)},this.run=function(r,c){e=r,n=Object.keys(r),t=c,i()},this.next=function(){i()}};module.exports=helpers;