yiminghe / node-jscover

node version of JSCover

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support function name count

yiminghe opened this issue · comments

code.js

function x(){}
y=function(){}

intrumented

_$jscoverage['code.js'].functionData.index[0] = ['x',1,1]; // [name,line,column]
_$jscoverage['code.js'].functionData.index[1] =['y',2,3];

function x() {
  _$jscoverage['code.js'].functionData[0]++;

}
_$jscoverage['code.js'].lineData[3]++;
y = function () {
  _$jscoverage['code.js'].functionData[1]++;
};