istanbul icon indicating copy to clipboard operation
istanbul copied to clipboard

Chained executions not included in coverage

Open Owlbertz opened this issue 6 years ago • 0 comments

Hi,

I have the following code

    D3NodeHelper.prototype.generateDragConnection = function (connectionsGroup) {
        return connectionsGroup.append('line')
            .classed('drag-link', true)
            .classed('tool-connect', true)
            .attr('x1', 0)
            .attr('y1', 0)
            .attr('x2', 0)

However, only the first line return connectionsGroup.append('line') is considered as covered (indicated by the 1x) at the beginning of the line, as seen below: image

This of course reduces the overall overage of my code a lot. Is there any way to make Istanbul consider these chained executions properly?

Owlbertz avatar Apr 25 '18 07:04 Owlbertz