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

## Statements: 98.8% (82 / 83) Branches: 75% (9 / 12) Functions: 100% (7 / 7) Lines: 100% (7 / 7) Ignored: none

All files » test-lib/ » compiler.js

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

    1
    9

    var __cov_nYrWR0zwjGJBAKoA3ZyF3w = (Function('return this'))();
    Iif (!__cov_nYrWR0zwjGJBAKoA3ZyF3w.__coverage__) { __cov_nYrWR0zwjGJBAKoA3ZyF3w.__coverage__ = {}; }
    __cov_nYrWR0zwjGJBAKoA3ZyF3w = __cov_nYrWR0zwjGJBAKoA3ZyF3w.__coverage__;
    Eif (!(__cov_nYrWR0zwjGJBAKoA3ZyF3w['/Users/matt/Code/Livescript/Livewire/lib/compiler.js'])) {
       __cov_nYrWR0zwjGJBAKoA3ZyF3w['/Users/matt/Code/Livescript/Livewire/lib/compiler.js'] = {"path":"/Users/matt/Code/Livescript/Livewire/lib/compiler.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":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},"b":{"1":[0,0,0],"2":[0,0,0],"3":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":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":9},"end":{"line":5,"column":21}}},"3":{"name":"(anonymous_3)","line":8,"loc":{"start":{"line":8,"column":35},"end":{"line":8,"column":49}}},"4":{"name":"(anonymous_4)","line":13,"loc":{"start":{"line":13,"column":68},"end":{"line":13,"column":86}}},"5":{"name":"(anonymous_5)","line":17,"loc":{"start":{"line":17,"column":11},"end":{"line":17,"column":21}}},"6":{"name":"(anonymous_6)","line":27,"loc":{"start":{"line":27,"column":11},"end":{"line":27,"column":24}}},"7":{"name":"(anonymous_7)","line":32,"loc":{"start":{"line":32,"column":21},"end":{"line":32,"column":31}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":46,"column":14}},"2":{"start":{"line":2,"column":2},"end":{"line":2,"column":128}},"3":{"start":{"line":3,"column":2},"end":{"line":3,"column":72}},"4":{"start":{"line":4,"column":2},"end":{"line":4,"column":34}},"5":{"start":{"line":5,"column":2},"end":{"line":7,"column":4}},"6":{"start":{"line":6,"column":4},"end":{"line":6,"column":29}},"7":{"start":{"line":8,"column":2},"end":{"line":45,"column":4}},"8":{"start":{"line":9,"column":4},"end":{"line":9,"column":44}},"9":{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},"10":{"start":{"line":11,"column":4},"end":{"line":11,"column":16}},"11":{"start":{"line":12,"column":4},"end":{"line":12,"column":16}},"12":{"start":{"line":13,"column":4},"end":{"line":16,"column":7}},"13":{"start":{"line":14,"column":6},"end":{"line":14,"column":25}},"14":{"start":{"line":15,"column":6},"end":{"line":15,"column":25}},"15":{"start":{"line":17,"column":4},"end":{"line":26,"column":9}},"16":{"start":{"line":18,"column":6},"end":{"line":25,"column":7}},"17":{"start":{"line":20,"column":8},"end":{"line":20,"column":22}},"18":{"start":{"line":22,"column":8},"end":{"line":22,"column":49}},"19":{"start":{"line":24,"column":8},"end":{"line":24,"column":53}},"20":{"start":{"line":27,"column":4},"end":{"line":44,"column":6}},"21":{"start":{"line":28,"column":6},"end":{"line":28,"column":46}},"22":{"start":{"line":29,"column":6},"end":{"line":29,"column":40}},"23":{"start":{"line":30,"column":6},"end":{"line":43,"column":7}},"24":{"start":{"line":31,"column":8},"end":{"line":31,"column":53}},"25":{"start":{"line":32,"column":8},"end":{"line":40,"column":14}},"26":{"start":{"line":33,"column":10},"end":{"line":33,"column":44}},"27":{"start":{"line":34,"column":10},"end":{"line":38,"column":11}},"28":{"start":{"line":35,"column":12},"end":{"line":35,"column":19}},"29":{"start":{"line":36,"column":12},"end":{"line":36,"column":27}},"30":{"start":{"line":37,"column":12},"end":{"line":37,"column":38}},"31":{"start":{"line":39,"column":10},"end":{"line":39,"column":26}},"32":{"start":{"line":42,"column":8},"end":{"line":42,"column":20}}},"branchMap":{"1":{"line":2,"type":"binary-expr","locations":[{"start":{"line":2,"column":60},"end":{"line":2,"column":89}},{"start":{"line":2,"column":93},"end":{"line":2,"column":100}},{"start":{"line":2,"column":104},"end":{"line":2,"column":108}}]},"2":{"line":18,"type":"switch","locations":[{"start":{"line":19,"column":6},"end":{"line":20,"column":22}},{"start":{"line":21,"column":6},"end":{"line":22,"column":49}},{"start":{"line":23,"column":6},"end":{"line":24,"column":53}}]},"3":{"line":30,"type":"if","locations":[{"start":{"line":30,"column":6},"end":{"line":30,"column":6}},{"start":{"line":30,"column":6},"end":{"line":30,"column":6}}]}}};
    }
    __cov_nYrWR0zwjGJBAKoA3ZyF3w = __cov_nYrWR0zwjGJBAKoA3ZyF3w['/Users/matt/Code/Livescript/Livewire/lib/compiler.js'];
    __cov_nYrWR0zwjGJBAKoA3ZyF3w.s['1']++;(function(){__cov_nYrWR0zwjGJBAKoA3ZyF3w.f['1']++;__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['2']++;var ref$,Some,None,parseUrl,last,compilePath,out$=(__cov_nYrWR0zwjGJBAKoA3ZyF3w.b['1'][0]++,typeof exports!='undefined')&&(__cov_nYrWR0zwjGJBAKoA3ZyF3w.b['1'][1]++,exports)||(__cov_nYrWR0zwjGJBAKoA3ZyF3w.b['1'][2]++,this),slice$=[].slice;__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['3']++;ref$=require('fantasy-options'),Some=ref$.Some,None=ref$.None;__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['4']++;parseUrl=require('url').parse;__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['5']++;last=function(it){__cov_nYrWR0zwjGJBAKoA3ZyF3w.f['2']++;__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['6']++;return it[it.length-1];};__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['7']++;out$.compilePath=compilePath=function(path){__cov_nYrWR0zwjGJBAKoA3ZyF3w.f['3']++;__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['8']++;var ident,sigil,params,paramReg,reg;__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['9']++;ident='[a-z$_][a-z0-9$_]*';__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['10']++;sigil=':';__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['11']++;params=[];__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['12']++;paramReg=path.replace(RegExp(sigil+'('+ident+')','i'),function(m,param){__cov_nYrWR0zwjGJBAKoA3ZyF3w.f['4']++;__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['13']++;params.push(param);__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['14']++;return'([^\\/]+)';});__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['15']++;reg=function(){__cov_nYrWR0zwjGJBAKoA3ZyF3w.f['5']++;__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['16']++;switch(false){case path!=='/':__cov_nYrWR0zwjGJBAKoA3ZyF3w.b['2'][0]++;__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['17']++;return/^\/$/;case'/'!==last(path):__cov_nYrWR0zwjGJBAKoA3ZyF3w.b['2'][1]++;__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['18']++;return RegExp('^'+paramReg+'?','i');default:__cov_nYrWR0zwjGJBAKoA3ZyF3w.b['2'][2]++;__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['19']++;return RegExp('^'+paramReg+'\\/?$','i');}}();__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['20']++;return function(url){__cov_nYrWR0zwjGJBAKoA3ZyF3w.f['6']++;__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['21']++;var pathname,that,route,vals,i,val;__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['22']++;pathname=parseUrl(url).pathname;__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['23']++;if((that=reg.exec(pathname))!=null){__cov_nYrWR0zwjGJBAKoA3ZyF3w.b['3'][0]++;__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['24']++;route=that[0],vals=slice$.call(that,1);__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['25']++;return Some(function(){__cov_nYrWR0zwjGJBAKoA3ZyF3w.f['7']++;__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['26']++;var i$,ref$,len$,results$={};__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['27']++;for(i$=0,len$=(ref$=vals).length;i$<len$;++i$){__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['28']++;i=i$;__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['29']++;val=ref$[i$];__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['30']++;results$[params[i]]=val;}__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['31']++;return results$;}());}else{__cov_nYrWR0zwjGJBAKoA3ZyF3w.b['3'][1]++;__cov_nYrWR0zwjGJBAKoA3ZyF3w.s['32']++;return None;}};};}.call(this));