# Code coverage report for Livewire/test-lib/result.js

## Statements: 98.2% (109 / 111) Branches: 68.18% (15 / 22) Functions: 100% (14 / 14) Lines: 100% (7 / 7) Ignored: none

All files » Livewire/test-lib/ » result.js

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

    1
    11

    var __cov_zRQ$gFjx3fwkqGvlgSB$$w = (Function('return this'))();
    Iif (!__cov_zRQ$gFjx3fwkqGvlgSB$$w.__coverage__) { __cov_zRQ$gFjx3fwkqGvlgSB$$w.__coverage__ = {}; }
    __cov_zRQ$gFjx3fwkqGvlgSB$$w = __cov_zRQ$gFjx3fwkqGvlgSB$$w.__coverage__;
    Eif (!(__cov_zRQ$gFjx3fwkqGvlgSB$$w['/Users/matt/Code/Livescript/Livewire/lib/result.js'])) {
       __cov_zRQ$gFjx3fwkqGvlgSB$$w['/Users/matt/Code/Livescript/Livewire/lib/result.js'] = {"path":"/Users/matt/Code/Livescript/Livewire/lib/result.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":1,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":1,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":1,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":1,"42":0,"43":0,"44":0,"45":0,"46":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0]},"f":{"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},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":11}}},"2":{"name":"(anonymous_2)","line":7,"loc":{"start":{"line":7,"column":29},"end":{"line":7,"column":39}}},"3":{"name":"Result","line":10,"loc":{"start":{"line":10,"column":4},"end":{"line":10,"column":54}}},"4":{"name":"ctor$","line":17,"loc":{"start":{"line":17,"column":6},"end":{"line":17,"column":22}}},"5":{"name":"(anonymous_5)","line":18,"loc":{"start":{"line":18,"column":27},"end":{"line":18,"column":47}}},"6":{"name":"(anonymous_6)","line":24,"loc":{"start":{"line":24,"column":16},"end":{"line":24,"column":26}}},"7":{"name":"(anonymous_7)","line":27,"loc":{"start":{"line":27,"column":22},"end":{"line":27,"column":32}}},"8":{"name":"(anonymous_8)","line":30,"loc":{"start":{"line":30,"column":19},"end":{"line":30,"column":29}}},"9":{"name":"(anonymous_9)","line":33,"loc":{"start":{"line":33,"column":22},"end":{"line":33,"column":41}}},"10":{"name":"(anonymous_10)","line":39,"loc":{"start":{"line":39,"column":28},"end":{"line":39,"column":42}}},"11":{"name":"curry$","line":45,"loc":{"start":{"line":45,"column":2},"end":{"line":45,"column":27}}},"12":{"name":"(anonymous_12)","line":47,"loc":{"start":{"line":47,"column":13},"end":{"line":47,"column":28}}},"13":{"name":"(anonymous_13)","line":48,"loc":{"start":{"line":48,"column":28},"end":{"line":48,"column":38}}},"14":{"name":"import$","line":58,"loc":{"start":{"line":58,"column":2},"end":{"line":58,"column":28}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":63,"column":14}},"2":{"start":{"line":2,"column":2},"end":{"line":2,"column":46}},"3":{"start":{"line":3,"column":2},"end":{"line":3,"column":46}},"4":{"start":{"line":4,"column":2},"end":{"line":4,"column":40}},"5":{"start":{"line":5,"column":2},"end":{"line":5,"column":29}},"6":{"start":{"line":6,"column":2},"end":{"line":6,"column":40}},"7":{"start":{"line":7,"column":2},"end":{"line":44,"column":7}},"8":{"start":{"line":8,"column":4},"end":{"line":8,"column":34}},"9":{"start":{"line":9,"column":4},"end":{"line":9,"column":59}},"10":{"start":{"line":10,"column":4},"end":{"line":17,"column":5}},"11":{"start":{"line":11,"column":6},"end":{"line":11,"column":59}},"12":{"start":{"line":12,"column":6},"end":{"line":12,"column":24}},"13":{"start":{"line":13,"column":6},"end":{"line":13,"column":36}},"14":{"start":{"line":14,"column":6},"end":{"line":14,"column":28}},"15":{"start":{"line":15,"column":6},"end":{"line":15,"column":30}},"16":{"start":{"line":16,"column":6},"end":{"line":16,"column":19}},"17":{"start":{"line":17,"column":6},"end":{"line":17,"column":24}},"18":{"start":{"line":17,"column":25},"end":{"line":17,"column":53}},"19":{"start":{"line":18,"column":4},"end":{"line":23,"column":7}},"20":{"start":{"line":19,"column":6},"end":{"line":22,"column":9}},"21":{"start":{"line":24,"column":4},"end":{"line":26,"column":6}},"22":{"start":{"line":25,"column":6},"end":{"line":25,"column":65}},"23":{"start":{"line":27,"column":4},"end":{"line":29,"column":6}},"24":{"start":{"line":28,"column":6},"end":{"line":28,"column":65}},"25":{"start":{"line":30,"column":4},"end":{"line":32,"column":6}},"26":{"start":{"line":31,"column":6},"end":{"line":31,"column":65}},"27":{"start":{"line":33,"column":4},"end":{"line":38,"column":6}},"28":{"start":{"line":34,"column":6},"end":{"line":34,"column":35}},"29":{"start":{"line":35,"column":6},"end":{"line":37,"column":10}},"30":{"start":{"line":39,"column":4},"end":{"line":42,"column":6}},"31":{"start":{"line":40,"column":6},"end":{"line":40,"column":34}},"32":{"start":{"line":41,"column":6},"end":{"line":41,"column":18}},"33":{"start":{"line":43,"column":4},"end":{"line":43,"column":18}},"34":{"start":{"line":45,"column":2},"end":{"line":57,"column":3}},"35":{"start":{"line":46,"column":4},"end":{"line":55,"column":6}},"36":{"start":{"line":48,"column":6},"end":{"line":54,"column":12}},"37":{"start":{"line":49,"column":8},"end":{"line":49,"column":47}},"38":{"start":{"line":50,"column":8},"end":{"line":50,"column":49}},"39":{"start":{"line":51,"column":8},"end":{"line":53,"column":66}},"40":{"start":{"line":56,"column":4},"end":{"line":56,"column":20}},"41":{"start":{"line":58,"column":2},"end":{"line":62,"column":3}},"42":{"start":{"line":59,"column":4},"end":{"line":59,"column":32}},"43":{"start":{"line":60,"column":4},"end":{"line":60,"column":69}},"44":{"start":{"line":60,"column":25},"end":{"line":60,"column":69}},"45":{"start":{"line":60,"column":49},"end":{"line":60,"column":69}},"46":{"start":{"line":61,"column":4},"end":{"line":61,"column":15}}},"branchMap":{"1":{"line":11,"type":"cond-expr","locations":[{"start":{"line":11,"column":42},"end":{"line":11,"column":46}},{"start":{"line":11,"column":49},"end":{"line":11,"column":58}}]},"2":{"line":34,"type":"binary-expr","locations":[{"start":{"line":34,"column":6},"end":{"line":34,"column":18}},{"start":{"line":34,"column":23},"end":{"line":34,"column":33}}]},"3":{"line":48,"type":"cond-expr","locations":[{"start":{"line":48,"column":28},"end":{"line":54,"column":7}},{"start":{"line":54,"column":10},"end":{"line":54,"column":11}}]},"4":{"line":49,"type":"cond-expr","locations":[{"start":{"line":49,"column":28},"end":{"line":49,"column":41}},{"start":{"line":49,"column":44},"end":{"line":49,"column":46}}]},"5":{"line":50,"type":"cond-expr","locations":[{"start":{"line":50,"column":26},"end":{"line":50,"column":41}},{"start":{"line":50,"column":44},"end":{"line":50,"column":48}}]},"6":{"line":50,"type":"binary-expr","locations":[{"start":{"line":50,"column":26},"end":{"line":50,"column":33}},{"start":{"line":50,"column":37},"end":{"line":50,"column":41}}]},"7":{"line":51,"type":"cond-expr","locations":[{"start":{"line":53,"column":10},"end":{"line":53,"column":38}},{"start":{"line":53,"column":41},"end":{"line":53,"column":65}}]},"8":{"line":51,"type":"binary-expr","locations":[{"start":{"line":51,"column":15},"end":{"line":52,"column":20}},{"start":{"line":52,"column":24},"end":{"line":52,"column":40}}]},"9":{"line":60,"type":"if","locations":[{"start":{"line":60,"column":25},"end":{"line":60,"column":25}},{"start":{"line":60,"column":25},"end":{"line":60,"column":25}}]}}};
    }
    __cov_zRQ$gFjx3fwkqGvlgSB$$w = __cov_zRQ$gFjx3fwkqGvlgSB$$w['/Users/matt/Code/Livescript/Livewire/lib/result.js'];
    __cov_zRQ$gFjx3fwkqGvlgSB$$w.s['1']++;(function(){__cov_zRQ$gFjx3fwkqGvlgSB$$w.f['1']++;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['2']++;var STATUS_CODES,Readable,Promise,Result;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['3']++;STATUS_CODES=require('http').STATUS_CODES;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['4']++;Readable=require('stream').Readable;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['5']++;require('fantasy-streams');__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['6']++;Promise=require('fantasy-promises');__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['7']++;module.exports=Result=function(){__cov_zRQ$gFjx3fwkqGvlgSB$$w.f['2']++;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['8']++;Result.displayName='Result';__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['9']++;var prototype=Result.prototype,constructor=Result;function Result(body,statusCode,status,headers){__cov_zRQ$gFjx3fwkqGvlgSB$$w.f['3']++;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['11']++;var this$=this instanceof ctor$?(__cov_zRQ$gFjx3fwkqGvlgSB$$w.b['1'][0]++,this):(__cov_zRQ$gFjx3fwkqGvlgSB$$w.b['1'][1]++,new ctor$());__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['12']++;this$.body=body;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['13']++;this$.statusCode=statusCode;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['14']++;this$.status=status;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['15']++;this$.headers=headers;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['16']++;return this$;}function ctor$(){__cov_zRQ$gFjx3fwkqGvlgSB$$w.f['4']++;}__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['18']++;ctor$.prototype=prototype;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['19']++;Result.simple=curry$(function(code,body){__cov_zRQ$gFjx3fwkqGvlgSB$$w.f['5']++;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['20']++;return Result(Readable.of(body),code,STATUS_CODES[code],{'content-length':body.length,'content-type':'text/plain'});});__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['21']++;Result.ok=function(){__cov_zRQ$gFjx3fwkqGvlgSB$$w.f['6']++;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['22']++;return Promise.of(this.simple(200).apply(this,arguments));};__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['23']++;Result.notFound=function(){__cov_zRQ$gFjx3fwkqGvlgSB$$w.f['7']++;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['24']++;return Promise.of(this.simple(404).apply(this,arguments));};__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['25']++;Result.error=function(){__cov_zRQ$gFjx3fwkqGvlgSB$$w.f['8']++;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['26']++;return Promise.of(this.simple(500).apply(this,arguments));};__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['27']++;Result.redirect=function(url,code){__cov_zRQ$gFjx3fwkqGvlgSB$$w.f['9']++;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['28']++;(__cov_zRQ$gFjx3fwkqGvlgSB$$w.b['2'][0]++,code==null)&&(__cov_zRQ$gFjx3fwkqGvlgSB$$w.b['2'][1]++,code=302);__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['29']++;return Promise.of(Result(Readable.empty(),code,null,{location:url}));};__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['30']++;prototype.withHeaders=function(more){__cov_zRQ$gFjx3fwkqGvlgSB$$w.f['10']++;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['31']++;import$(this.headers,more);__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['32']++;return this;};__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['33']++;return Result;}();function curry$(f,bound){__cov_zRQ$gFjx3fwkqGvlgSB$$w.f['11']++;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['35']++;var context,_curry=function(args){__cov_zRQ$gFjx3fwkqGvlgSB$$w.f['12']++;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['36']++;return f.length>1?(__cov_zRQ$gFjx3fwkqGvlgSB$$w.b['3'][0]++,function(){__cov_zRQ$gFjx3fwkqGvlgSB$$w.f['13']++;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['37']++;var params=args?(__cov_zRQ$gFjx3fwkqGvlgSB$$w.b['4'][0]++,args.concat()):(__cov_zRQ$gFjx3fwkqGvlgSB$$w.b['4'][1]++,[]);__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['38']++;context=bound?(__cov_zRQ$gFjx3fwkqGvlgSB$$w.b['5'][0]++,(__cov_zRQ$gFjx3fwkqGvlgSB$$w.b['6'][0]++,context)||(__cov_zRQ$gFjx3fwkqGvlgSB$$w.b['6'][1]++,this)):(__cov_zRQ$gFjx3fwkqGvlgSB$$w.b['5'][1]++,this);__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['39']++;return(__cov_zRQ$gFjx3fwkqGvlgSB$$w.b['8'][0]++,params.push.apply(params,arguments)<f.length)&&(__cov_zRQ$gFjx3fwkqGvlgSB$$w.b['8'][1]++,arguments.length)?(__cov_zRQ$gFjx3fwkqGvlgSB$$w.b['7'][0]++,_curry.call(context,params)):(__cov_zRQ$gFjx3fwkqGvlgSB$$w.b['7'][1]++,f.apply(context,params));}):(__cov_zRQ$gFjx3fwkqGvlgSB$$w.b['3'][1]++,f);};__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['40']++;return _curry();}function import$(obj,src){__cov_zRQ$gFjx3fwkqGvlgSB$$w.f['14']++;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['42']++;var own={}.hasOwnProperty;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['43']++;for(var key in src){__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['44']++;Eif(own.call(src,key)){__cov_zRQ$gFjx3fwkqGvlgSB$$w.b['9'][0]++;__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['45']++;obj[key]=src[key];}else{__cov_zRQ$gFjx3fwkqGvlgSB$$w.b['9'][1]++;}}__cov_zRQ$gFjx3fwkqGvlgSB$$w.s['46']++;return obj;}}.call(this));