π§π»βπ 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
npm i -D poku tsx
bun add -d poku
deno add npm:poku # optional
Testβ
- 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β
- Node.js and TypeScript (Node.js)
- Bun
- Deno
npx poku
bunx poku
deno run npm:poku
Try the flag
--parallel
to run tests in parallel.
- 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 on Deno and alternatives to JSR.
- Migrating from version 1.x to version 2.x.
Security Policyβ
Please check the SECURITY.md.
Acknowledgementsβ
Licenseβ
Poku is under the MIT License.
Copyright Β© 2024-present Weslley AraΓΊjo and Poku contributors.