Glossary
Glossary Unit Testing

Unit Testing

Also known as: unit test, unit tests
TechTesting

Definition

Testing one unit — a function, a class, a component — in isolation from the rest of the system, with its collaborators replaced or absent

Fast, many, and precise about where something broke. The base of the testing pyramid and the thinnest layer of the testing trophy; the two shapes disagree about how many you want, not what they are.

Tech

A test that can tell you which function is wrong. That precision is the whole value, and also the cost: a unit test passes when the unit does what the test says, which is not the same as the product working.

In this repository: test/unit/ under the unit vitest project, Node environment. shared/utils/case.ts → test/unit/case.test.ts.

Avoid: calling a test "unit" because it is in the unit folder. A test that boots the framework is an integration test wherever it lives.

Related Terms

  • a: Appearance
  • ?: Keyboard shortcuts