🧑🏻🎓 Recommended Roadmap
- Install Poku.
- See how to use assertions.
- Then learn how to use Poku to run all your test files at once.
🧑🏻🔬 Need to test an API? Check the startService and startScript.
🚪 Need to handle processes and ports? Check the kill and waitForPort.
🐳 Need to mount and unmount containers before/after tests? Check the dockerfile and compose.
🧠 Here's a quick example covering the main difference across common test runners.🔍 Use the site search to make it easier.
Quickstart
Install
- Node.js
- TypeScript (Node.js)
- Bun
- Deno
npm i -D poku
Canary version:
npm i -D poku@canary
bun add -d poku
Canary version:
bun add -d poku@canary
deno add npm:poku # optional
Canary version:
deno add npm:poku@canary # optional
Test
- test/file.test.mjs
import { assert } from 'poku';
assert(true, 'Poku will describe it 🐷');
- Change from
.mjsto.jsby defining"type": "module"in your package.json. - Note that these examples use ESM, but you can use CJS as well.
Run
- Node.js and TypeScript (Node.js)
- Bun
- Deno
npx poku
bun poku
deno run npm:poku
Canary version:
deno run npm:poku@canary
Try the flag
--sequentialto run tests sequentially.
- That's it 🎉
Documentation
Initially the documentation, examples, and quick tutorials are based on Node.js and ESM usage, but you can use all the options normally for both Bun and Deno, including CJS.
Common Issues
- Avoiding conflicts in environments with multiple platforms installed.
- Properly running asynchronous tests on the same file.
- Using Poku without installing it on Deno.
- Migrating:
Security Policy
Please check the SECURITY.md.
Acknowledgements
License
Poku is under the MIT License.
Copyright © 2024-present Weslley Araújo and Poku contributors.