Skip to content
RED SAGSkills
hard20 pts · first answer countsboundary-value-analysiswhite-box-testing

Boundary values from code

Weight is entered in kilograms with one decimal place (step 0.1). Which set of values covers every boundary in this function with two-value boundary value analysis?

function shippingFee(weightKg) {
  if (weightKg <= 0) throw new Error('invalid weight')
  if (weightKg < 5) return 10
  if (weightKg <= 20) return 25
  return 60
}
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions