einingaprófun
Einingaprófun, or unit testing, is a software testing method where individual units of source code—the smallest testable parts of an application—are isolated and tested to determine whether they are fit for use. A unit is the smallest piece of code that can be logically isolated in a system. In imperative and object-oriented programming, a unit is often a function, a method, or a procedure. In functional programming, it can be a function.
The purpose of unit testing is to validate that each unit of the software performs as designed.
Key benefits of unit testing include improved code quality, easier debugging, better design, and acting as documentation