What is behavior-driven development (BDD)?
BDD describes behavior in shared language that product, engineering, and QA can understand.
The question library
Explore practical questions, clear explanations, and code examples across developer technologies.
Showing 3553–3564 of 3610 questions
BDD describes behavior in shared language that product, engineering, and QA can understand.
Mutation testing introduces small faults, such as changing a comparison operator, to check whether tests detect them.
A flaky test passes and fails without a relevant code change.
Unit testing verifies a small unit such as a pure function or class in isolation from unrelated infrastructure.
Arrange, Act, Assert is a structure for tests: create the needed state, execute the behavior, and assert the outcome.
Jest is a JavaScript/TypeScript testing framework with test discovery, assertions, mocks, setup hooks, and coverage reporting.
Vitest is a test runner designed to work closely with Vite's ecosystem and supports familiar Jest-like APIs.
Mocks replace a collaborator with a controlled implementation so a unit can be tested independently.
A stub supplies predefined responses; a mock often includes expectations about interactions; a spy observes calls to a real or wrapped function.
Return or await promises so the runner knows when the test finishes.
Assert that the expected error type or code is thrown or rejected.
Parameterized tests run the same behavior against multiple input/output pairs.