Enjoying Poku? Give him a star to show your support π
π· WebsiteΒ Β β’Β Β π DocumentationΒ Β β’Β Β π§ͺ ExamplesΒ Β β’Β Β π§π»βπ Tutorials
Important
Poku is growing and version 3 is on its way! You can already try it by installing the Release Candidate.
- To check out what's coming, follow the Issue #801.
- For
v2
documentation, see the previous version's documentation and README.
π‘ Poku is a cross-platform test runner that brings the JavaScript essence back to testing.
High isolation level per file
Performant and lightweight
Auto detect ESM, CJS, and TypeScript files
Run the same test suite for Node.js, Bun, and Deno
Easily handle servers, processes, ports, and even containers β¨
# Node.js
npm i -D poku@rc |
# TypeScript (Node.js)
npm i -D poku@rc tsx |
# Bun
bun add -d poku@rc |
# Deno (optional)
deno add npm:poku@rc |
test/file.test.mjs |
import { assert } from 'poku';
assert(true, 'Poku will describe it π·'); |
Node.js (and TypeScript) |
Bun |
Deno |
npx poku |
bun poku |
deno run npm:poku@rc |
poku | π§ͺ Test runner. |
assert | π Test assertion (Node.js familiar API). |
strict | π¬ Strict test assertion (Node.js familiar API). |
test β’ describe β’ it | π€Ήπ»ββοΈ Organize, group, and isolate tests. |
envFile | βοΈ Process an environment file (out-of-box). |
beforeEach β’ afterEach | π Hooks for test setup and teardown. |
startScript | π Run package.json scripts in background. |
startService | π Run files in background. |
docker | π³ Build, start, compose, stop, remove, and test containers. |
kill | π Terminate ports, port ranges, and PIDs. |
waitForPort | π΄ Wait for specified ports to become active. |
waitForExpectedResult | π₯± Retry until an expected result or times out. |
skip | βοΈ Skip tests when necessary. |
only | π Debug tests by enabling selective runs. |
getPIDs | π΅π» Debug processes IDs using ports and port ranges. |
watch | πΏ Watch for changes and re-run related test files. |
debug | π΅π» Shows all logs. |
config | βοΈ Customize your Poku options in a config file. |
and much more ππ»
To see the detailed documentation, please visit the Documentation and Examples sections in the Poku's website.
Poku offers mini-lessons for different users needs in the Quick Tutorials section.
- Avoiding conflicts in environments with multiple platforms installed.
- Properly running asynchronous tests on the same file.
- Using Poku without installing on Deno and alternatives to JSR.
- Migrating from version 2.x to version 3.x (rc).
Poku is continuously tested to ensure the following expectations for basic usage:
- ~4x faster than Jest (v29.7.0)
- ~4x faster than Vitest (v2.1.3)
- ~2x faster than Mocha (v10.7.3) β even with test file isolation
- You can see how the tests are run and compared in the benchmark directory.
- Comparing Poku and native test runners (discussion).
Poku size ensures cost-saving CI for services that charge for storage and usage.
Please check the SECURITY.md.
See the Contributing Guide and please follow our Code of Conduct π
Poku is under the MIT License.
Copyright Β© 2024-present Weslley AraΓΊjo and Poku contributors.