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

@artiphishle/testosterone

v0.2.7

Published

![npm (scoped)](https://img.shields.io/npm/v/@artiphishle/testosterone?style=flat-square) ![license](https://img.shields.io/npm/l/@artiphishle/testosterone?style=flat-square) ![issues](https://img.shields.io/github/issues/artiphishle/testosterone?style=fl

Readme

npm (scoped) license issues PRs

Testosterone

!!! Attention: It seems your project requires React version '^19.2.0' for now to make component rendering tests possible

A lightweight, blazing-fast testing framework for TypeScript projects, built with simplicity and power in mind.

✨ Features

  • 🚀 Super fast test runner using tsx
  • Zero config for Node.js and React/Next.js projects
  • 🛠️ TypeScript-first (full type safety)
  • 🧪 Supports unit, integration, and React component tests
  • 🌟 Automatic JSX support for React tests without touching your tsconfig
  • 🔍 Automatic project detection (Node / React / Next.js)
  • 📚 Simple CLI (npx testosterone) — no bloated configuration needed
  • ✅ Works inside monorepos (workspace-ready)

📦 Installation

If you don't use PNPM please remove the packageManager property from the package.json to allow another package manager.

bun add -D @artiphishle/testosterone

🚀 Usage

Run tests simply with:

bunx testosterone

By default, it finds test files matching:

  • **/*.spec.ts
  • **/*.spec.tsx
  • **/*.test.ts
  • **/*.test.tsx

⚙️ CLI Options

| Option | Description | | ---------------- | ---------------------------------------- | | -c, --coverage | Generate a coverage report using c8 | | -w, --watch | Watch mode: rerun tests on file changes | | --react | Force React testing mode | | --node | Force Node.js testing mode | | -v, --verbose | Verbose output (detailed test reporting) |

Example:

bunx testosterone --coverage

🧐 How it works

  • Detects if you're using React/Next.js or Node.js automatically.
  • Sets up JSDOM for React tests.
  • Generates a temporary tsconfig with safe settings for JSX (no need to touch your own tsconfig!).
  • Runs tests with tsx — super fast without build steps.
  • Handles path aliases (@/ etc.) automatically.

🔠 Test Example

Node test (.spec.ts)

import React from 'react'; // Important
import { describe, it, assert } from 'testosterone/src/node';

describe('Math', () => {
  it('should add numbers', () => {
    assert.strictEqual(1 + 1, 2);
  });
});

React test (.spec.tsx)

import React from 'react'; // Important
import { describe, it } from 'testosterone/src/node';
import { expect, render } from 'testosterone/src/react';
import Button from '@/components/Button';

describe('Button', () => {
  it('renders correctly', () => {
    const { getByText } = render(<Button />);
    expect(screen.getByText('Click me')).toBeDefined();
  });
});

🔮 Why Testosterone?

  • Tiny: Minimalistic by design.
  • Powerful: Supports real-world projects.
  • Modern: Full ESM, TypeScript, React 19 compatible.
  • No magic: Understandable, hackable, no vendor lock-in.

📄 License

MIT