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

tst

v9.2.2

Published

Tests without efforts

Readme

tst test npm package minimized gzipped size npm demo

Test without efforts.

  • vanilla ESM — no build, no tooling
  • node + browser
  • standalone assertions
  • async, timeouts, TAP
  • 0 deps, ~400 LOC

usage

import test from 'tst.js'

test('math', ({ ok, is }) => {
  ok(true)
  is(1 + 1, 2)
  is({a: 1}, {a: 1})  // deep equality
})

test('async', async ({ ok }) => {
  await fetch('/api')
  ok(true)
})

assertions

| Function | Description | |----------|-------------| | ok(a, msg?) | Assert truthy | | is(a, b, msg?) | Assert equal (Object.is for primitives, deep equal for objects) | | not(a, b, msg?) | Assert not equal | | any(a, [x,y,z], msg?) | Assert value is one of options | | same(a, b, msg?) | Assert same members (order-independent) | | throws(fn, match?, msg?) | Assert fn throws (optionally matching regex/class) | | rejects(fn, match?, msg?) | Assert async fn rejects (optionally matching regex/class) | | almost(a, b, eps?, msg?) | Assert approximate equality | | pass(msg) / fail(msg) | Explicit pass/fail |

[!NOTE] Standalone use: import { ok, is, not, any, same, throws, rejects, almost, pass, fail } from 'tst/assert.js'

modifiers

test.skip('ignored', t => {})      // skip test
test.todo('future feature')        // mark as todo
test.only('focus', t => {})        // run only this
test.mute('quiet', t => {})        // hide assertions, show summary
test.demo('example', t => {})      // run but don't fail exit code
test.fork('isolate', t => {})      // run in worker thread (fresh V8 context)

// Combine via options
test('both', { fork: true, only: true }, t => {})

[!NOTE] Fork has no scope access — use data for values, await import() for modules.

[!TIP] Use .fork for tests with potential infinite loops — timeout can only terminate forked workers, not main thread.

options

test('name', {
  timeout: 3000,           // override default 5000ms
  data: { x: 1 },          // pass to callback as 2nd arg
  retry: 3,                // retry up to n times (flaky tests)

  // modifiers
  only: process.env.DEBUG, // run only this test when debugging
  skip: isCI,              // conditionally skip
  todo: !featureComplete,  // mark as todo until feature is ready
  mute: isCI,              // hide assertions in CI, show summary
  demo: true,              // run but don't fail exit code (for examples)
  fork: bench              // run in worker thread (fresh V8 context)
}, (t, data) => {})

config

Manual run (disables auto-run):

import test from 'tst.js'
await test.run({
  grep: /api/,       // filter by name
  bail: true,        // stop on first failure
  mute: true,        // hide passing tests
  timeout: 10000,    // fail if takes >10s
  format: 'tap'      // pretty (default), tap or custom object
})

Or env vars:

TST_GREP=pattern node test.js  # filter by name
TST_BAIL=1 node test.js        # stop on first failure
TST_MUTE=1 node test.js        # hide passing tests
TST_FORMAT=tap node test.js    # TAP output (pipeable)

Or URL params (browser):

test.html?grep=pattern
test.html?bail
test.html?mute
test.html?format=tap

[!NOTE] Tests run sequentially. For parallelism, run separate test files.

why?

You want to test add(1, 2) === 3. Jest wants jest.config.js, babel.config.js, 200MB node_modules, transformation pipelines, mock systems. Testing should be: write test, run file, see result. No setup, no maintenance, no build step. Spiritual successor to tape — browser + node, ESM-native, async-native.