Why Poku?β
Poku can show you how simple testing can be π±
Let's make describe
, beforeEach
and everything else easier π
π¬ Start by seeing how to use
assert
π§π»βπ¬ Need to test an API? Check thestartService
andstartScript
π§ͺ Then learn how to usepoku
CLI to run all your test files at once
π§π» So, just if you want to, go deeper into learning about Pokuπ©΅ Take Your Time
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 it π¬β
- test/file.test.mjs
import { assert } from 'poku';
assert(true, 'Poku will describe it π·');
- Change from
.mjs
to.js
by defining"type": "module"
in your package.json. - Note that these examples use ESM, but you can use CJS as well.
Run it πβ
- Node.js and TypeScript (Node.js)
- Bun
- Deno
npx poku
bun poku
deno run npm:poku
Poku requires these permissions by default:
--allow-read
--allow-env
--allow-run
That's it πβ
Available Methodsβ
Essentialsβ
- poku (test runner)
- assert (test assertion)
- startScript (run
package.json
scripts in a background process) - startService (run files in a background process)
Helpersβ
test
beforeEach
andafterEach
describe
andlog
listFiles
exit
See the complete documentation.
Documentationβ
Initially, the documentation and examples are based on Node.js and ESM usage, but you can use all the options normally for both Bun and Deno, including CJS.
Communityβ
I'm continuously working to improve Poku. If you've got something interesting to share, feel free to submit a Pull Request. If you notice something wrong, I'd appreciate if you'd open an Issue.
Contributingβ
Please check the CONTRIBUTING.md for instructions π
Licenseβ
Poku is under the MIT License.
Security Policyβ
Please check the SECURITY.md and the section Is Poku Safe? from Documentation.
Acknowledgementsβ
Authorβ
@wellwelwel