Parameterized (data-driven) tests என்பவை பல input மற்றும் expected output sets உடன் ஒரே test logic ஐ இயக்குகின்றன — ஒவ்வொரு case க்கும் test ஐ duplicate செய்வதை தவிர்க்கின்றன. பல scenarios (edge cases உட்பட) ஐ சுருக்கமாக test செய்ய இவை எளிதாக்குகின்றன.
சிக்கல்: duplicate tests
Without parameterization, testing many input/output cases means COPYING the test:
test('add 2+3', () => expect(add(2,3)).toBe(5));
test('add 0+0', () => expect(add(0,0)).toBe(0));
test('add -1+1', () => expect(add(-1,1)).toBe(0));
→ lots of near-identical, repetitive tests (tedious, hard to maintain)
