Frontend & browser·Testing a user interface
you tested one function's output for a given input, with nothing else running around it.
Unit test
A test of a single piece of logic in isolation, with its collaborators replaced or absent. It runs in milliseconds and points directly at the broken line, which is why it is the right shape for pure logic — formatting, parsing, reducers, calculations. In a user interface most bugs are not in one function, which is why a suite made only of these can be green while the page is broken.