Skip to content

Commit 91a3132

Browse files
committed
feat: skip type definitions during code coverage calculation
1 parent e7b406d commit 91a3132

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

transform/listFunctions.mts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -494,15 +494,11 @@ class SourceFunctionTransform extends Transform {
494494
startLine = LineRange.source.lineAt(LineRange.start);
495495
endLine = LineRange.source.lineAt(LineRange.end);
496496
}
497-
} else {
498-
const LineRange = node.range;
499-
startLine = LineRange.source.lineAt(LineRange.start);
500-
endLine = LineRange.source.lineAt(LineRange.end);
501-
}
502-
this.functionInfos.push({
503-
name: this.#elementsByDeclaration.get(node)?.internalName ?? node.name.text,
504-
range: [startLine, endLine],
505-
});
497+
this.functionInfos.push({
498+
name: this.#elementsByDeclaration.get(node)?.internalName ?? node.name.text,
499+
range: [startLine, endLine],
500+
});
501+
}
506502
}
507503
if (node.body) {
508504
this.visitNode(node.body);

0 commit comments

Comments
 (0)