🐷 Poku makes testing easy for Node.js, Bun, Deno, and you at the same time.


Keywords
🐷, test, runner, assert, assertion, testing, node, bun, deno, typescript, tsx, run, cli, unit, integration, e2e, end-to-end, tdd, bdd, watch, jest, mocha, chai, vitest, ava, uvu, tap, tape, karma, supertest, dotenv, filter, exclude, list, files, env, kill, container, process, port, cross-platform, commonjs, cjs, esmodules, esm, mjs, runtime, poku, pokujs, dependency-free, e2e-testing, integration-testing, javascript, kill-port, nodejs, test-runner, unit-testing, zero-dependency
License
MIT
Install
npm install poku@1.22.0

Documentation

Poku's Logo

Poku

Enjoying Poku? Give him a star to show your support 🌟

NPM Downloads NPM Downloads Coverage
GitHub Workflow Status (Linux) GitHub Workflow Status (OSX) GitHub Workflow Status (Windows)


🐷 Website  •  📘 Documentation  •  🧪 Examples  •  🧑🏻‍🎓 Tutorials


Why does Poku exist?

💡 Poku is a cross-platform test runner that brings the JavaScript essence back to testing.

check High isolation level per file
check Performant and lightweight
check Run CommonJS files directly with Deno
check Auto detect ESM, CJS, and TypeScript files
check Run the same test suite for Node.js, Bun, and Deno
check Easily handle servers, processes, ports, and even containers


Quickstart

check Install

# Node.js
npm i -D poku
# TypeScript (Node.js)
npm i -D poku tsx
# Bun
bun add -d poku
# Deno (optional)
deno add npm:poku

check Test

test/file.test.mjs
import { assert } from 'poku';

assert(true, 'Poku will describe it 🐷');

check Run

Node.js (and TypeScript)
Bun
Deno
npx poku
bunx poku
deno run npm:poku

Features

check Essentials

poku 🧪 Test runner.
assert 🔍 Test assertion (Node.js familiar API).
strict 🔬 Strict test assertion (Node.js familiar API).

check Helpers

testdescribeit 🤹🏻‍♀️ Organize, group, and isolate tests.
envFile ⚙️ Process an environment file (out-of-box).
beforeEachafterEach 🃏 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.
getPIDs 🕵🏻 Debug processes IDs using ports and port ranges.

check Common Options

watch 🍿 Watch for changes and re-run related test files.
parallel 🏃🏻‍♀️ Run tests in parallel.
debug 🕵🏻 Shows all logs.
config ⚙️ Customize your Poku options in a config file.

and much more 👇🏻


Documentation and Examples

To see the detailed documentation, please visit the Documentation and Examples sections in the Poku's website.


Tutorials

Poku offers mini-lessons for different users needs in the Quick Tutorials section.


Common Issues


Quick Comparisons

Performance

Poku is continuously tested to ensure the following expectations for basic usage:

  • ~4x faster than Jest (v29.7.0)
  • ~3x faster than Vitest (v1.6.0)
  • ~1x faster than Mocha (v10.4.0) + Chai (v5.1.1)

Installation Size

Install Size

Poku size ensures cost-saving CI for services that charge for storage and usage.


Security Policy

GitHub Workflow Status (with event)

Please check the SECURITY.md.


Contributing

See the Contributing Guide and please follow our Code of Conduct 🚀


Acknowledgements

Contributors

Contributors


License

Poku is under the MIT License.
Copyright © 2024-present Weslley Araújo and Poku contributors.