Why does Poku exist?
Poku makes testing easy and takes on the testers' difficulties to let you focus on your tests:
No configurations
ย ย ย ย ย Auto detect ESM and CJS
ย ย ย ย ย Auto detect Typescript files
ย ย ย ย ย Run the same test suite for Node.js (6+), Bun and Deno
Easier and Less Verbose
ย ย ย ย ย Node.js familiar API
ย ย ย ย ย Instantly re-run related tests in watch
mode
ย ย ย ย ย Run CJS (CommonJS) files directly with Deno
ย ย ย ย ย Easily handle, servers, services, processes, and ports
Safety and Reliability
ย ย ย ย ย High isolation level per file
ย ย ย ย ย Performant and lightweight
ย ย ย ย ย Compatible with coverage tools
๐ก Poku brings the essence of JavaScript back to testing, allowing to use your knowledge to create tests intuitively.
Quickstart
Install
Node.js | TypeScript + Node.js | Bun | Deno |
npm i -D poku
|
npm i -D poku tsx
|
bun add -d poku
|
deno add npm:poku
|
Test
test/file.test.mjs
|
import { assert } from 'poku';
assert(true, 'Poku will describe it ๐ท');
|
Run
Node.js (and TypeScript) | Bun | Deno |
npx poku
|
bunx poku
|
deno run npm:poku
|
๐ท Documentationย ย โขย ย ๐งช Examplesย ย โขย ย ๐ฌ Compare the Most Popular Test Runners
Available Methods
Essentials
Helpers
- test
, describe and it (organize, group, and isolate tests)
- watch (watch for changes and re-run related test files)
- beforeEach and afterEach (hooks for test setup and teardown)
- startScript (run package.json scripts in background)
- startService (run files in background)
- kill (terminate ports, port ranges, and PIDs)
- getPIDs (debug processes IDs using ports and port ranges)
- and much more ๐๐ป
Documentation and Examples
To see the detailed documentation, please visit the Documentation and Examples sections in the Poku's website.
Contributing
See the Contributing Guide and please follow our Code of Conduct ๐
Security Policy
Please check the SECURITY.md.
Quick Comparisons
Performance
Poku is continuously tested to ensure the following expectations:
- ~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)
You can see how the tests are run and compared in the benchmark directory.
Installation Size
Limitations
- Although it has no external dependencies, Poku is not all-in-one, so it doesn't have features such as mocks, spies, coverage reports, etc., where you can use your favorite packages or native solutions.
- Poku community is gradually building up.
Acknowledgements
License
Poku is under the MIT License.