- Home
- JavaScript Testing Frameworks
- @hapi/lab
On the recordRead 8 Oct 202616 facts
@hapi/lab
On the record
- Assertions
- Lab works best with the @hapi/code assertion library, but can be used with any assertion library that throws when a condition is not met.hapi.dev · read 8 Oct 2026
- Compatibility
- The page lists Node.js 16 or newer for major versions 25 and 26, with a BSD license.hapi.dev · read 4 Oct 2026
- Compatibility and license
- The page lists versions 26 and 25 as BSD-licensed and compatible with Node.js 16 or later.hapi.dev · read 8 Oct 2026
- Coverage
- Lab can measure code coverage and enforce a minimum coverage threshold.hapi.dev · read 8 Oct 2026
- Coverage and reports
- Lab supports code coverage and console, HTML, JSON, JUnit XML, TAP, LCOV, and Clover XML reporters.hapi.dev · read 4 Oct 2026
- Design
- Lab uses async/await and aims to keep its execution engine simple rather than build an extensible framework.hapi.dev · read 4 Oct 2026
- Ecosystem
- The project says Lab was designed to work with the hapi framework and its components, and also works with other frameworks or on its own.github.com · read 4 Oct 2026
- Installation
- The documented installation commands use npm, Yarn, or pnpm to add @hapi/lab to a project.hapi.dev · read 8 Oct 2026
- Purpose
- @hapi/lab is a test utility for Node.js.hapi.dev · read 8 Oct 2026
- Reporters
- Built-in reporters include console, HTML, JSON, JUnit XML, TAP, LCOV, and Clover XML.hapi.dev · read 8 Oct 2026
- Security reporting
- The hapi security policy asks people to report suspected security issues with hapi modules privately to [email protected] rather than opening public issues.hapi.dev · read 4 Oct 2026
- Support
- The hapi support page says free help is available through GitHub issues, Discord, and Slack.hapi.dev · read 8 Oct 2026
- Test formats
- Lab supports BDD-style describe/it and TDD-style suite/test interfaces.hapi.dev · read 8 Oct 2026
- Test organization
- Tests can be grouped into experiments with before, after, beforeEach, and afterEach setup and cleanup hooks.hapi.dev · read 8 Oct 2026
- Test style
- Lab uses async/await and describes its execution engine as deliberately simple rather than an extensible framework.hapi.dev · read 8 Oct 2026
- TypeScript
- Lab includes TypeScript definitions and has a CLI option to run TypeScript test files using the project’s TypeScript module and configuration.hapi.dev · read 8 Oct 2026