Skip to main content

Practice ยท 3 of 3

Regression Test Ledger

Write addRegression(ledger, bugId, fixCommit, coversAll) โ€” a bug joins the regression ledger only when it is fixed AND its test covers the reported scenario (coversAll true): append { bugId, fixCommit } and return the new array (non-mutating). If coversAll is false, return the ledger unchanged. If bugId is already in the ledger, return the ledger unchanged (no duplicates).

Difficulty: intermediate

Back to lesson: Practice: Regression Net โ€” Practice