Skip to content

Commit

Permalink
fix root function range for startOffset (vitest wrapper)
Browse files Browse the repository at this point in the history
  • Loading branch information
cenfun committed Feb 26, 2025
1 parent 26eb298 commit 6556958
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions lib/converter/converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -1249,17 +1249,9 @@ const filterCoverageList = (item) => {
return false;
});


const rootFunctionInfo = wrapperList.length ? wrapperList.pop() : {
root: true,
ranges: [{
startOffset: minOffset,
endOffset: maxOffset,
count: 1
}]
};

coverageList.unshift(rootFunctionInfo);
if (wrapperList.length) {
coverageList.unshift(wrapperList.pop());
}

// if (item.sourcePath.includes('PlaceB.tsx')) {
// console.log(coverageList);
Expand Down

0 comments on commit 6556958

Please sign in to comment.