2.7 Unit Testing
Last updated
Last updated
Unit testing is a systematic and automated validation approach aimed at verifying the accuracy and dependability of discrete components or units within a smart contract. By crafting specialized test cases, developers can isolate these individual units and meticulously assess their behavior under controlled input scenarios. This rigorous and well-structured testing process aids in early defect detection, promotes code modularity, and fosters the creation of a robust and secure blockchain application, all while seamlessly integrating with continuous integration and deployment practices.
Where to Write Test Cases and Run Tests:
Step 1: Write unit tests in “.spec.ts” extension files.
Step 2 : Go to “Unit Test” from the Icon Panel
Step 3 : Click on Run to Execute Test cases and ensure Complaince