@hapi/lab vs Pure Test
@hapi/lab
hapi.devPure Test
github.comSide by side
| Figure | @hapi/lab | Pure Test |
|---|---|---|
| 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.0 (#6) |
| Installation | The documented installation commands use npm, Yarn, or pnpm to add @hapi/lab to a project. | The README gives `npm install @igorjs/pure-test --save-dev` as the installation command. |
| Purpose | @hapi/lab is a test utility for Node.js. | Pure Test is a minimal, zero-dependency, cross-runtime test runner. |
| TypeScript | Lab includes TypeScript definitions and has a CLI option to run TypeScript test files using the project’s TypeScript module and configuration. | TypeScript test discovery is opt-in with `--ts` on Node.js and automatic on Deno and Bun. |
Plans
In their own words
Pure Test
Pure Test is a free, minimal test runner for projects using JavaScript runtimes and browsers. It supports Node.js, Deno, Bun, Cloudflare Workers, and browsers, and its API includes test suites, assertions, lifecycle hooks, spies, fake timers, and retry and timeout options. The CLI provides multiple reporters, test filters, file watching, sharding, and fail-fast execution. For CI, `--shard` splits test files across jobs and exits cleanly when a shard has no files. TypeScript test discovery requires `--ts` on Node.js; it is automatic on Deno and Bun. A Deno adapter registers tests as `Deno.test()` calls for use with `deno test` and its filtering and IDE workflows. The README includes migration guides for Jest and Vitest and notes compatibility with common mock methods. Pure Test does not isolate tests, so lifecycle hooks are recommended for managing state. The project is beta, and its APIs may change. It is Apache-2.0 licensed, with no paid plans stated.