npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tesht.js

v1.2.1

Published

A fast, minimal, zero-config JavaScript test runner

Readme

The Minimalist JavaScript Test Runner

npm version License: MIT Node.js

Zero config. Zero dependencies. Blazing fast. Instant feedback for developers who want results without the bloat.

InstallationQuick StartFeaturesAPI ReferenceContributing


💡 Motivation

Modern test runners are powerful but often come with heavy configuration, slow startup times, and massive dependency trees.

tesht.js strips away the complexity. It gives you instant startup, a clean API, and zero overhead. It's built for when you just need to write a test and run it—fast.

[!NOTE] Why tesht.js? The package names test and tesht are reserved/taken on npm, so we use tesht.js.

✨ Features

  • ⚡️ Instant Startup: Boots in ~50ms. No waiting.
  • 🛠️ Zero Config: Works immediately. No config files required.
  • 📦 Lightweight: Zero dependencies. No bloat in your node_modules.
  • 🧠 Async First: First-class support for async/await and Promises.
  • 🎨 Beautiful: Clean, colorful terminal output with fail-fast options.
  • 🔁 Watch Mode: Auto-rerun tests on file changes for rapid development.
  • 🎯 Focused Testing: Use .only() and .skip() to control test execution.
  • 🪝 Test Hooks: beforeEach and afterEach for setup and cleanup.
  • ⏱️ Timeout Support: Configurable timeouts prevent hanging tests.

📦 Installation

[!IMPORTANT] Run the following command to install the package as a development dependency:

npm install tesht.js --save-dev

🚀 Quick Start

Here's how easy it is to get started:

import { test, expect } from 'tesht.js';

// 1. Write a test (e.g., math.test.js)
test('basic arithmetic', () => {
    expect(1 + 1).toBe(2);
});

// 2. Async works automatically
test('async operations', async () => {
    const result = await Promise.resolve('success');
    expect(result).toBe('success');
});

// 3. Use hooks for setup/cleanup
**Run it:**

```bash
npx tesht              # Run all tests
npx tesht --watch      # Watch mode

afterEach(() => { // Cleanup after each test });

// 4. Skip or focus tests test.skip('not ready yet', () => { // This test won't run });

test.only('focus on this', () => { // Only .only tests will run });


**Run it:**

```bash
npx tesht

📖 API Reference

Core Methods

| Method | Description | |--------|-------------| | test(name, fn, options?) | Registers a test case. fn can be async. | | test.skip(name, fn) | Skip this test. | | test.only(name, fn) | Only run this test (and other .only tests). |

CLI Commands

npx tesht              # Run all tests in current dir
npx tesht src/         # Run tests in specific dir
npx tesht --all        # Run all tests (disable fail-fast)
npx tesht --watch      # Watch mode - rerun on changes
npx tesht --plain      # CI-friendly output (no colors/unicode)
npx tesht --ci         # Alias for --plain
```timeout`: Test timeout in ms (default: 5000)
### Matchers

Tesht.js provides essential matchers for your assertions:

| Matcher | Description | Example |
| :--- | :--- | :--- |
| `.toBe(expected)` | Strict equality (`===`). | `expect(x).toBe(5)` |
| `.toEqual(expected)` | Deep equality for objects/arrays. | `expect(obj).toEqual({a:1})` |
| `.toBeTruthy()` | Asserts value is truthy. | `expect(x).toBeTruthy()` |
| `.toBeFalsy()` | Asserts value is falsy. | `expect(x).toBeFalsy()` |
| `.toBeNull()` | Asserts value is `null`. | `expect(x).toBeNull()` |
| `.toBeUndefined()` | Asserts value is `undefined`. | `expect(x).toBeUndefined()` |
| `.toContain(item)` | Array/string contains item. | `expect([1,2]).toContain(2)` |
| `.toHaveLength(n)` | Array/string has length `n`. | `expect([1,2]).toHaveLength(2)` |
| `.toBeGreaterThan(n)` | Number is greater than `n`. | `expect(5).toBeGreaterThan(3)` |
| `.toBeLessThan(n)` | Number is less than `n`. | `expect(3).toBeLessThan(5)` |
| `.toMatch(regex)` | String matches regex. | `expect('hi').toMatch(/h/)` |
| `.toThrow(msg?)` | Function throws an error. | `expect(fn).toThrow()` |
npx tesht           # Run all tests in current dir
npx tesht src/      # Run tests in specific dir
npx tesht --all     # Run all tests (disable fail-fast)

Matchers

Tesht.js provides essential matchers for your assertions:

| Matcher | Description | Example | | :--- | :--- | :--- | | .toBe(expected) | Strict equality (===). | expect(x).toBe(5) | | .toEqual(expected) | Deep equality for objects/arrays. | expect(obj).toEqual({a:1}) | | .toBeTruthy() | Asserts value is truthy. | expect(x).toBeTruthy() | | .toBeFalsy() | Asserts value is falsy. | expect(x).toBeFalsy() | | .toThrow(msg?) | Asserts function throws an error. | expect(fn).toThrow() |

🤝 Contributing

We welcome contributions! Please feel free to open issues or submit PRs.

📄 License

MIT License © 2026