https://github.com/mhweiner/kizu
An easy-to-use, fast, and defensive Typescript/Javascript test runner designed to help you to write simple, readable, and maintainable tests.
https://github.com/mhweiner/kizu
ava jasmine jest jest-testing jest-tests mocha mocha-typescript mochajs test testing typescript unit unit-testing vitest vitest-ts
Last synced: 12 days ago
JSON representation
An easy-to-use, fast, and defensive Typescript/Javascript test runner designed to help you to write simple, readable, and maintainable tests.
- Host: GitHub
- URL: https://github.com/mhweiner/kizu
- Owner: mhweiner
- License: mit
- Created: 2021-10-31T03:10:10.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-06-08T21:23:30.000Z (14 days ago)
- Last Synced: 2025-06-08T21:31:00.871Z (14 days ago)
- Topics: ava, jasmine, jest, jest-testing, jest-tests, mocha, mocha-typescript, mochajs, test, testing, typescript, unit, unit-testing, vitest, vitest-ts
- Language: TypeScript
- Homepage: https://github.com/mhweiner/kizu/blob/main/README.md
- Size: 1.04 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/mhweiner/kizu/actions)
[]()
[](https://conventionalcommits.org)
[](https://github.com/mhweiner/autorel)Kizu is a fast, minimalist test runner for TypeScript and JavaScript, with a small, easy-to-learn API that lets you focus on your tests β not your tooling.
Designed to help you write simple, readable, and maintainable tests.
## Features
### **π Fast & Reliable**
- Multi-process parallel test runner. Each test file is run in its own process/runtime for performance and isolation benefits. _Use on a multicore machine for best results._
- Optimized for speed and simplicity.
- Minimal dependencies.### **π Easy to Use**
- Very simple functional [assertion API](docs/api.md). No need to learn a DSL or framework.
- Built-in [powerful diff visualization tool](#visual-diff-tool)
- Clean, organized output.
- Failed tests are easy to find, grouped at the end of the output.
- Errors or unhandled promise rejections are buffered and grouped under the test file in the output. This helps you know where they came from.
- Clean stack traces with no extra noise.### **π‘ Defensive**
- Uncaught errors and unhandled promise rejections will cause the test to fail.
- Any spec files without tests, or tests without assertions, result in a failed test.
- Strict and deep equality comparison by default.### **π Out-of-the-box Typescript support**
- No special configuration needed, and no plugins to install.
- Works great with [c8](https://github.com/bcoe/c8) for code coverage.
- Handles compilation errors gracefully.## Quick Examples
For more examples, see the [examples](examples) and [src](src) folders.
```typescript
import {test} from 'kizu';// Basic test
function greet(name: string): string {
return `hello, ${name}`;
}test('greet()', (assert) => {
assert.equal(hello('world'), 'hello, world');
});// Error handling
function throwError(): never {
throw new Error('oops');
}test('throwError()', (assert) => {
assert.throws(() => throwError(), /oops/);
});// Async test
async function fetchData(): Promise {
return Promise.resolve('data');
}test('fetchData()', async (assert) => {
const data = await fetchData();
assert.equal(data, 'data');
});
```## Table of Contents
- [Getting Started](docs/gettingStarted.md)
- [Examples](#examples)
- [API](docs/api.md)
- [Visual Diff Tool](docs/visualDiff.md)
- [Best Practices](docs/bestPractices.md)
- [Inspiration, Philosophy & Attribution](docs/inspiration.md)
- [FAQ](docs/faq.md)
- [Support, Feedback, and Contributions](#support-feedback-and-contributions)
- [Sponsorship](#sponsorship)
- [License](LICENSE)## Getting Started
To install and get started with `kizu`, see our [Getting Started](docs/gettingStarted.md) guide.
See the [examples](examples) and [src](src) folders for more examples.## Support, feedback, and contributions
- Star this repo if you like it!
- Submit an [issue](https://github.com/mhweiner/kizu/issues) with your problem, feature request or bug report
- Issue a PR against `main` and request review. Make sure all tests pass and coverage is good.
- Write about this project in your blog, tweet about it, or share it with your friends!## Sponsorship
Aeroview is a lightning-fast, developer-friendly, AI-powered logging IDE. Get started for free at [https://aeroview.io](https://aeroview.io).
Want to sponsor this project? [Reach out](mailto:[email protected]?subject=I%20want%20to%20sponsor%20kizu).
## Related projects
- [cjs-mock](https://github.com/mhweiner/cjs-mock): NodeJS module mocking for CJS (CommonJS) modules for unit testing purposes.
- [autorel](https://github.com/mhweiner/autorel): Automate semantic releases based on conventional commits. Similar to semantic-release but much simpler.
- [brek](https://github.com/mhweiner/brek): A powerful yet simple configuration library for Node.js. Itβs structured, typed, and designed for dynamic configuration loading, making it perfect for securely managing secrets (e.g., AWS Secrets Manager).
- [jsout](https://github.com/mhweiner/jsout): A Syslog-compatible, small, and simple logger for Typescript/Javascript projects.