# Code coverage report for test-lib/respond.js

## Statements: 59.42% (41 / 69) Branches: 47.62% (10 / 21) Functions: 44.44% (4 / 9) Lines: 100% (7 / 7) Ignored: none

All files » test-lib/ » respond.js

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    1
    1
    1
    1
    1

    1
    10

    var __cov_GamSRnwA4XzCSjmXJtGkZw = (Function('return this'))();
    Iif (!__cov_GamSRnwA4XzCSjmXJtGkZw.__coverage__) { __cov_GamSRnwA4XzCSjmXJtGkZw.__coverage__ = {}; }
    __cov_GamSRnwA4XzCSjmXJtGkZw = __cov_GamSRnwA4XzCSjmXJtGkZw.__coverage__;
    Eif (!(__cov_GamSRnwA4XzCSjmXJtGkZw['/Users/matt/Code/Livescript/Livewire/lib/respond.js'])) {
       __cov_GamSRnwA4XzCSjmXJtGkZw['/Users/matt/Code/Livescript/Livewire/lib/respond.js'] = {"path":"/Users/matt/Code/Livescript/Livewire/lib/respond.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":1,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0},"b":{"1":[0,0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":11}}},"2":{"name":"(anonymous_2)","line":5,"loc":{"start":{"line":5,"column":10},"end":{"line":5,"column":24}}},"3":{"name":"(anonymous_3)","line":12,"loc":{"start":{"line":12,"column":34},"end":{"line":12,"column":67}}},"4":{"name":"(anonymous_4)","line":16,"loc":{"start":{"line":16,"column":11},"end":{"line":16,"column":28}}},"5":{"name":"(anonymous_5)","line":17,"loc":{"start":{"line":17,"column":57},"end":{"line":17,"column":67}}},"6":{"name":"(anonymous_6)","line":18,"loc":{"start":{"line":18,"column":42},"end":{"line":18,"column":58}}},"7":{"name":"curry$","line":28,"loc":{"start":{"line":28,"column":2},"end":{"line":28,"column":27}}},"8":{"name":"(anonymous_8)","line":30,"loc":{"start":{"line":30,"column":13},"end":{"line":30,"column":28}}},"9":{"name":"(anonymous_9)","line":31,"loc":{"start":{"line":31,"column":28},"end":{"line":31,"column":38}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":41,"column":14}},"2":{"start":{"line":2,"column":2},"end":{"line":2,"column":122}},"3":{"start":{"line":3,"column":2},"end":{"line":3,"column":72}},"4":{"start":{"line":4,"column":2},"end":{"line":4,"column":50}},"5":{"start":{"line":5,"column":2},"end":{"line":11,"column":4}},"6":{"start":{"line":6,"column":4},"end":{"line":10,"column":5}},"7":{"start":{"line":7,"column":6},"end":{"line":7,"column":24}},"8":{"start":{"line":9,"column":6},"end":{"line":9,"column":18}},"9":{"start":{"line":12,"column":2},"end":{"line":23,"column":5}},"10":{"start":{"line":13,"column":4},"end":{"line":13,"column":23}},"11":{"start":{"line":14,"column":4},"end":{"line":14,"column":33}},"12":{"start":{"line":15,"column":4},"end":{"line":15,"column":32}},"13":{"start":{"line":16,"column":4},"end":{"line":22,"column":6}},"14":{"start":{"line":17,"column":6},"end":{"line":21,"column":9}},"15":{"start":{"line":18,"column":8},"end":{"line":20,"column":11}},"16":{"start":{"line":19,"column":10},"end":{"line":19,"column":69}},"17":{"start":{"line":24,"column":2},"end":{"line":27,"column":3}},"18":{"start":{"line":25,"column":4},"end":{"line":25,"column":17}},"19":{"start":{"line":26,"column":4},"end":{"line":26,"column":28}},"20":{"start":{"line":28,"column":2},"end":{"line":40,"column":3}},"21":{"start":{"line":29,"column":4},"end":{"line":38,"column":6}},"22":{"start":{"line":31,"column":6},"end":{"line":37,"column":12}},"23":{"start":{"line":32,"column":8},"end":{"line":32,"column":47}},"24":{"start":{"line":33,"column":8},"end":{"line":33,"column":49}},"25":{"start":{"line":34,"column":8},"end":{"line":36,"column":66}},"26":{"start":{"line":39,"column":4},"end":{"line":39,"column":20}}},"branchMap":{"1":{"line":2,"type":"binary-expr","locations":[{"start":{"line":2,"column":73},"end":{"line":2,"column":102}},{"start":{"line":2,"column":106},"end":{"line":2,"column":113}},{"start":{"line":2,"column":117},"end":{"line":2,"column":121}}]},"2":{"line":6,"type":"if","locations":[{"start":{"line":6,"column":4},"end":{"line":6,"column":4}},{"start":{"line":6,"column":4},"end":{"line":6,"column":4}}]},"3":{"line":31,"type":"cond-expr","locations":[{"start":{"line":31,"column":28},"end":{"line":37,"column":7}},{"start":{"line":37,"column":10},"end":{"line":37,"column":11}}]},"4":{"line":32,"type":"cond-expr","locations":[{"start":{"line":32,"column":28},"end":{"line":32,"column":41}},{"start":{"line":32,"column":44},"end":{"line":32,"column":46}}]},"5":{"line":33,"type":"cond-expr","locations":[{"start":{"line":33,"column":26},"end":{"line":33,"column":41}},{"start":{"line":33,"column":44},"end":{"line":33,"column":48}}]},"6":{"line":33,"type":"binary-expr","locations":[{"start":{"line":33,"column":26},"end":{"line":33,"column":33}},{"start":{"line":33,"column":37},"end":{"line":33,"column":41}}]},"7":{"line":34,"type":"cond-expr","locations":[{"start":{"line":36,"column":10},"end":{"line":36,"column":38}},{"start":{"line":36,"column":41},"end":{"line":36,"column":65}}]},"8":{"line":34,"type":"binary-expr","locations":[{"start":{"line":34,"column":15},"end":{"line":35,"column":20}},{"start":{"line":35,"column":24},"end":{"line":35,"column":40}}]}}};
    }
    __cov_GamSRnwA4XzCSjmXJtGkZw = __cov_GamSRnwA4XzCSjmXJtGkZw['/Users/matt/Code/Livescript/Livewire/lib/respond.js'];
    __cov_GamSRnwA4XzCSjmXJtGkZw.s['1']++;(function(){__cov_GamSRnwA4XzCSjmXJtGkZw.f['1']++;__cov_GamSRnwA4XzCSjmXJtGkZw.s['2']++;var ref$,Some,None,compilePath,guard,respond,i$,len$,m,out$=(__cov_GamSRnwA4XzCSjmXJtGkZw.b['1'][0]++,typeof exports!='undefined')&&(__cov_GamSRnwA4XzCSjmXJtGkZw.b['1'][1]++,exports)||(__cov_GamSRnwA4XzCSjmXJtGkZw.b['1'][2]++,this);__cov_GamSRnwA4XzCSjmXJtGkZw.s['3']++;ref$=require('fantasy-options'),Some=ref$.Some,None=ref$.None;__cov_GamSRnwA4XzCSjmXJtGkZw.s['4']++;compilePath=require('./compiler').compilePath;__cov_GamSRnwA4XzCSjmXJtGkZw.s['5']++;guard=function(cond){__cov_GamSRnwA4XzCSjmXJtGkZw.f['2']++;__cov_GamSRnwA4XzCSjmXJtGkZw.s['6']++;if(cond){__cov_GamSRnwA4XzCSjmXJtGkZw.b['2'][0]++;__cov_GamSRnwA4XzCSjmXJtGkZw.s['7']++;return Some(null);}else{__cov_GamSRnwA4XzCSjmXJtGkZw.b['2'][1]++;__cov_GamSRnwA4XzCSjmXJtGkZw.s['8']++;return None;}};__cov_GamSRnwA4XzCSjmXJtGkZw.s['9']++;out$.respond=respond=curry$(function(method,path,responder){__cov_GamSRnwA4XzCSjmXJtGkZw.f['3']++;__cov_GamSRnwA4XzCSjmXJtGkZw.s['10']++;var lower,extract;__cov_GamSRnwA4XzCSjmXJtGkZw.s['11']++;lower=method.toLowerCase();__cov_GamSRnwA4XzCSjmXJtGkZw.s['12']++;extract=compilePath(path);__cov_GamSRnwA4XzCSjmXJtGkZw.s['13']++;return function(request){__cov_GamSRnwA4XzCSjmXJtGkZw.f['4']++;__cov_GamSRnwA4XzCSjmXJtGkZw.s['14']++;return guard(lower===method.toLowerCase()).chain(function(){__cov_GamSRnwA4XzCSjmXJtGkZw.f['5']++;__cov_GamSRnwA4XzCSjmXJtGkZw.s['15']++;return extract(request.url).chain(function(params){__cov_GamSRnwA4XzCSjmXJtGkZw.f['6']++;__cov_GamSRnwA4XzCSjmXJtGkZw.s['16']++;return Some(responder((request.params=params,request)));});});};});__cov_GamSRnwA4XzCSjmXJtGkZw.s['17']++;for(i$=0,len$=(ref$=['get','post','put','delete','patch','options','head','trace','connect']).length;i$<len$;++i$){__cov_GamSRnwA4XzCSjmXJtGkZw.s['18']++;m=ref$[i$];__cov_GamSRnwA4XzCSjmXJtGkZw.s['19']++;exports[m]=respond(m);}function curry$(f,bound){__cov_GamSRnwA4XzCSjmXJtGkZw.f['7']++;__cov_GamSRnwA4XzCSjmXJtGkZw.s['21']++;var context,_curry=function(args){__cov_GamSRnwA4XzCSjmXJtGkZw.f['8']++;__cov_GamSRnwA4XzCSjmXJtGkZw.s['22']++;return f.length>1?(__cov_GamSRnwA4XzCSjmXJtGkZw.b['3'][0]++,function(){__cov_GamSRnwA4XzCSjmXJtGkZw.f['9']++;__cov_GamSRnwA4XzCSjmXJtGkZw.s['23']++;var params=args?(__cov_GamSRnwA4XzCSjmXJtGkZw.b['4'][0]++,args.concat()):(__cov_GamSRnwA4XzCSjmXJtGkZw.b['4'][1]++,[]);__cov_GamSRnwA4XzCSjmXJtGkZw.s['24']++;context=bound?(__cov_GamSRnwA4XzCSjmXJtGkZw.b['5'][0]++,(__cov_GamSRnwA4XzCSjmXJtGkZw.b['6'][0]++,context)||(__cov_GamSRnwA4XzCSjmXJtGkZw.b['6'][1]++,this)):(__cov_GamSRnwA4XzCSjmXJtGkZw.b['5'][1]++,this);__cov_GamSRnwA4XzCSjmXJtGkZw.s['25']++;return(__cov_GamSRnwA4XzCSjmXJtGkZw.b['8'][0]++,params.push.apply(params,arguments)<f.length)&&(__cov_GamSRnwA4XzCSjmXJtGkZw.b['8'][1]++,arguments.length)?(__cov_GamSRnwA4XzCSjmXJtGkZw.b['7'][0]++,_curry.call(context,params)):(__cov_GamSRnwA4XzCSjmXJtGkZw.b['7'][1]++,f.apply(context,params));}):(__cov_GamSRnwA4XzCSjmXJtGkZw.b['3'][1]++,f);};__cov_GamSRnwA4XzCSjmXJtGkZw.s['26']++;return _curry();}}.call(this));