poku
TypeScript icon, indicating that this package has built-in type declarations

1.17.0 • Public • Published
Logo

Poku

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

NPM Downloads Coverage License
GitHub Workflow Status (with event) GitHub Workflow Status (with event) GitHub Workflow Status (with event)


Why does Poku exist?

Poku makes testing easy and takes on the testers' difficulties to let you focus on your tests:

check No configurations
     check Auto detect ESM and CJS
     check Auto detect Typescript files
     check Run the same test suite for Node.js (6+), Bun and Deno

check Easier and Less Verbose
     check Node.js familiar API
     check Run CJS (CommonJS) files directly with Deno
     check Easily handle, servers, services, processes, and ports

check Safety and Reliability
     check High isolation level per file
     check Performant and lightweight
     check 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
  • That's it 🎉

🐷 Documentation  •  🧪 Examples  •  🔬 Compare the Most Popular Test Runners


Available Methods

Essentials

Helpers

  • test , describe and it (organize, group, and isolate tests)
  • beforeEach and afterEach (hooks for test setup and teardown)
  • watch (watch test files for changes)
  • 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

GitHub Workflow Status (with event)

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

Install 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

Contributors

Contributors


License

Poku is under the MIT License.

Package Sidebar

Install

npm i poku

Homepage

poku.io

Weekly Downloads

1,279

Version

1.17.0

License

MIT

Unpacked Size

153 kB

Total Files

93

Last publish

Collaborators

  • weslley.io