Overview of Poku features and helpers
mainPoku is a high-isolation, performant, and lightweight cross-platform test runner. It supports ESM, CJS, and TypeScript, and can run the same test suite across Node.js, Bun, and Deno.
Core Capabilities
- Test Runner: Core engine for executing tests.
- Assertions:
assert(strict, Node.js familiar API). - Test Organization:
test,describe, anditfor grouping and isolating tests. - Lifecycle Hooks:
beforeEachandafterEachfor setup and teardown. - Environment & Process Management:
envFileto process environment files.startScriptandstartServiceto run scripts/files in the background.killto terminate ports, port ranges, or PIDs.waitForPortto wait for active ports.waitForExpectedResultto retry until a result is met or it times out.
- Flow Control:
skipto bypass tests andonlyfor selective debugging. - Infrastructure & Plugins:
dockerplugin for container management (build, start, compose, stop, remove).coverageplugin for collecting code coverage.
- Configuration & CLI:
configfiles to customize behavior.watchmode to re-run tests on file changes.debugmode to show all logs.