Test Runner
beginnerDefinition
The program that finds a project's tests, runs them, and reports which passed and which failed.
In the wild
Typing `npm test` starts the project's test runner, Vitest, which runs 120 tests and reports "118 passed, 2 failed" with the name of each failing test.
More from Testing & Quality
Assertion
The line in a test that states what the result should be, so the test fails if the real result is different.
End-to-End (E2E) Test
A test that uses the whole app the way a real person would, clicking buttons, filling in forms, and moving between pages, to check that everything works together.
Fixture
Ready-made sample data that many tests share, so they all start from the same known situation.
Flaky Test
A test that sometimes passes and sometimes fails even though nothing in the code changed, usually because it depends on something unpredictable like the clock or network speed.
Integration Test
A test that checks that two or more parts of an app work correctly together, such as the code that saves a booking and the database it saves to.
Linting
Running a tool called a linter that reads code without running it and flags typos, risky patterns, and style problems, like a spell checker for code.