Skip to main content

Practice ยท 1 of 3

Edge Case Enumerator

Write edgeCases(value) classifying a value against the standard checklist; return an array of the case names that APPLY: "empty" (empty array/string/object), "boundary" (0, -0, or Number.MAX_SAFE_INTEGER), "wrong-type" (null, undefined, NaN, or a non-empty string where a number reads natural), "duplicate" (array with at least one repeated element). Order: empty, boundary, wrong-type, duplicate.

Difficulty: intermediate

Back to lesson: Practice: Designing Test Cases โ€” Practice