Comparing Test Runners
Test Runner | Isolation | CJS | ESM | node_modules | Bun | Deno |
---|---|---|---|---|---|---|
π· Poku (2.0.0) | β | β | β | β | β | |
Jest (29.7.0) | β | β | experimental | β | β | |
Mocha (10.4.0) | β | β | β | β | β | |
Vitest (1.6.0) | β | deprecated | β | β | β |
Quick Comparisonsβ
Performanceβ
Poku is continuously tested to ensure the following expectations for basic usage:
- ~4x faster than Jest (v29.7.0)
- ~4x faster than Vitest (v2.1.3)
- ~2x faster than Mocha (v10.7.3) β even with test file isolation
- You can see how the tests are run and compared in the benchmark directory.
- Comparing Poku and native test runners (discussion).
Installation Sizeβ
TypeScript Comparisonβ
Comparison using TypeScript (no compile) and ESM to show a simple error test:
- Let's starting from installation π¬
- Poku
- Jest
- Mocha + Chai
- Vitest
- AVA
Pokuβ
Installationβ
npm i -D poku tsx
Creating the test fileβ
test/index.test.ts
import { assert } from 'poku';
assert.deepStrictEqual('1', 1, 'Number should not be a text');
Running testsβ
npx poku
That's it π
tip
For simple tests, Poku doesn't need to use test
, describe
or it
, since the message is already in the assert
.
- Poku's
assert
is just an abstraction from originalassert
from Node.js. - It means: No new learning is needed π
Adopt a Poku for yourself π©΅