Skip to content
RED SAG Skills
medium10 pts · first answer countstest-designwhite-box-testingcode-coverage

Statement versus branch coverage

Look at the code. Which single test gives 100% statement coverage but not 100% branch coverage?

function pay(amount) {
  let fee = 20
  if (amount > 500) {
    fee = 0
  }
  return amount + fee
}
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions