@hapi/lab vs Web Test Runner
@hapi/lab
hapi.devWeb Test Runner
modern-web.devSide by side
| Figure | @hapi/lab | Web Test Runner |
|---|---|---|
| Price from | — | Free |
| Free plan | — | Yes |
| Free trial | — | — |
| Open source | — | — |
| Web | — | Yes |
| Windows | — | Yes |
| macOS | — | Yes |
| Linux | — | Yes |
| Self-hosted | — | Yes |
| Plans published | 0 | 1 |
| Spec score · JavaScript Testing Frameworks | 7.0 (#20) | 8.2 (#4) |
| Installation | The documented installation commands use npm, Yarn, or pnpm to add @hapi/lab to a project. | The official installation instructions use npm to add @web/test-runner as a development dependency. |
| Purpose | @hapi/lab is a test utility for Node.js. | Web Test Runner is a test runner for web applications. |
| Support | The hapi support page says free help is available through GitHub issues, Discord, and Slack. | The project links to Discord for community discussion and lists sponsorship and contributions as ways to support it. |
Plans
In their own words
Web Test Runner
Web Test Runner is a test runner for web applications, installable as an npm development dependency. It runs tests in parallel and isolation, giving each test file its own browser environment. Headless testing is supported through launchers including Puppeteer, Playwright, Selenium, BrowserStack, and WebdriverIO. Playwright can use Chromium, Firefox, and WebKit; BrowserStack runs tests remotely, including against older browser versions. Debug mode opens a browser window with developer tools, and the runner reports browser logs, 404 responses, and errors. Its command line offers interactive watch mode that reruns tests when files change, plus code coverage with configurable thresholds and reports. Default coverage instrumentation uses Chromium. Other features include ES module mocking through import maps and Mocha integration, with guidance for a custom test framework. The project is MIT-licensed, powered by esbuild and Rollup plugins, and directs users to GitHub and Discord for help and discussion. It is free and open source.