Comparing Test Runners
Quick Comparisonsβ
Performanceβ
Poku is continuously tested to ensure the following expectations for basic usage:
- ~4x faster than Jest (v30.0.5)
 - ~5x faster than Vitest (v3.2.4)
 - ~1x faster than Mocha (v11.7.1) β even with test file isolation π
 
All comparisons are rounded down (e.g., 4.99 would be rounded down to ~4x).
- 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 
assertis just an abstraction from originalassertfrom Node.js. - It means: No new learning is needed π
 
Adopt a Poku for yourself π©΅
Jestβ
Installationβ
npm i -D jest @types/jest ts-jest
Configuring TypeScriptβ
Add in your tsconfig.json
{
  "compilerOptions": {
    "esModuleInterop": true
  }
}
Configuring Jestβ
jest.config.js
export default {
  preset: 'ts-jest',
  testEnvironment: 'node',
  testMatch: ['**/test/**/*.test.ts'],
};
Creating the test fileβ
test/index.test.ts
describe('Type comparison', () => {
  test('Number should not be a text', () => {
    expect('1').toStrictEqual(1);
  });
});
Running testsβ
npx jest
Mocha + Chaiβ
Installationβ
npm i -D mocha @types/mocha chai @types/chai ts-node
Configuring ts-nodeβ
ts-loader.js
import { register } from 'node:module';
import { pathToFileURL } from 'node:url';
register('ts-node/esm', pathToFileURL('./'));
Configuring Mochaβ
.mocharc.json
{
  "spec": "./test/**/*.test.ts",
  "require": "ts-loader.js"
}
Creating the test fileβ
test/index.test.ts
import { expect } from 'chai';
describe('Type comparison', () => {
  it('Number should not be a text', () => {
    expect('1').to.deep.equal(1);
  });
});
Running testsβ
npx mocha
Vitestβ
Installationβ
npm i -D vitest ts-node
Configuring Vitestβ
vitest.config.ts
import { defineConfig } from 'vitest/config';
export default defineConfig({
  test: {
    include: ['test/**/*.test.ts'],
    globals: true,
    environment: 'node',
  },
});
Creating the test fileβ
test/index.test.ts
import { describe, it, expect } from 'vitest';
describe('Type comparison', () => {
  it('Number should not be a text', () => {
    expect('1').toStrictEqual(1);
  });
});
Running testsβ
npx vitest run
AVAβ
Installationβ
npm i -D ava tsimp
Configuring Gitβ
Include in the .gitignore:
/.tsimp
Configuring AVAβ
Include in the package.json:
{
  "ava": {
    "files": ["test/**/*.test.ts"],
    "extensions": {
      "ts": "module"
    },
    "nodeArguments": ["--import=tsimp"]
  }
}
Creating the test fileβ
test/index.test.ts
import test from 'ava';
test('Number should not be a text', (t) => {
  t.deepEqual('1', 1);
});
Running testsβ
npx ava