Introduction to Assertion
Assertions allow you to test the code you have written by performing a hard verification of a test designed.
The following are examples of assertion modules that are available for use:
- Assert
- Should
- Expect
- Chai(utilizes the assert, should,expect styles with several added features and capabilities)
- Must
These are the factors that could influence your choice of assertion module:
- Ease of Writing (Natural Language vs Traditional Language)
- Reporting Ability (Error Messaging)
- Helpful Documentation (Accessibility and Quality)
The articles below will look deeper into the best tools for assertions.