T
T
tostershmoster2021-09-23 15:04:48
Unit testing
tostershmoster, 2021-09-23 15:04:48

Why doesn't jest --coverage show Uncovered Line?

There is a method in the class

public updateRangeSliderValues(settings: ISettings): View {
  const isVertical = this.settings?.isVertical as boolean;

  if (settings.isTwoRunners) {
    this.range.setMarginFromBegin(this.rangeMarginFrom, isVertical);
    this.from.setMargin(this.thumbMarginFrom, settings);
    this.from.tooltip.setTooltipText(this.settings!.valueFrom);
  }
  this.range.setMarginFromEnd(this.rangeMarginTo, isVertical);
  this.to.setMargin(this.thumbMarginTo, settings);
  this.to.tooltip.setTooltipText(this.settings!.valueTo);
  return this;
}


When executing jest --coverage, there is not a single line of this code in the Uncovered Line column.
What does it mean this method does not need to be tested? Why?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question