New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@kitest/kitest

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@kitest/kitest

An easy-to-use, fast, and defensive Typescript/Javascript test runner designed to help you to write simple, readable, and maintainable tests.

latest
Source
npmnpm
Version
3.5.2
Version published
Maintainers
1
Created
Source
Logo

build status SemVer Conventional Commits AutoRel

kitest 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.

Fast, minimal, precise, safe, atomic, and easy to use.

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. No need to learn a DSL or framework.
  • Built-in powerful diff visualization tool and 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 for code coverage.
  • Handles compilation errors gracefully.

Quick Examples

import {test} from '@kitest/kitest';

// 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<string> {
  return Promise.resolve('data');
}

test('fetchData()', async (assert) => {
  const data = await fetchData();
  assert.equal(data, 'data');
});

Table of Contents

Getting Started

To install and get started with kitest, see our Getting Started guide.

Examples

See the examples and src folders for more examples.

Support, feedback, and contributions

  • Star this repo if you like it!
  • Submit an issue 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


Logo

Aeroview is a lightning-fast, developer-friendly, AI-powered logging IDE. Get started for free at https://aeroview.io.

Want to sponsor this project? Reach out.

Other useful libraries

  • autorel: Automate semantic releases based on conventional commits. Similar to semantic-release but much simpler.
  • 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: A Syslog-compatible, small, and simple logger for Typescript/Javascript projects.
  • cjs-mock: NodeJS module mocking for CJS (CommonJS) modules for unit testing purposes.
  • typura: Simple and extensible runtime input validation for TS/JS, written in TS.

Keywords

unit test

FAQs

Package last updated on 05 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts