Functional tests

These are tests that validate the correctness of the code, from a features point of view (that is, does the software do what it should?). Functional tests need to validate that everything works as expected:

  • Unit tests: Unit tests are the lowest level tests that we can write. These tests focus on the smallest units of code (for example, functions and classes). For example, we could write a unit test that checks a specific function or class. Unit tests assume that the system is a white box; this means that we know the inner workings of the system when writing the tests. These tests should work in complete isolation. This means that if the unit of code under test relies on other parts of the system, then these should be abstracted ...

Get Learn TypeScript 3 by Building Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.