Assertions एक test में ऐसे कथन होते हैं जो जाँचते हैं कि कोई शर्त सत्य है या नहीं — यह सत्यापित करते हुए कि वास्तविक परिणाम अपेक्षित परिणाम से मेल खाता है। यही वह मूल हैं जिससे tests pass या fail तय करते हैं: यदि कोई assertion विफल होता है, तो test विफल हो जाता है।
Assertions क्या करते हैं
An ASSERTION checks that something is as expected:
→ "assert that the actual value EQUALS the expected value"
→ if TRUE → the assertion passes; if FALSE → the assertion FAILS → the TEST FAILS
→ Assertions are how a test VERIFIES behavior (the "check" part of a test).
