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

parasito

v0.1.7

Published

Universal TypeScript-first HTTP testing library for Express, Fastify, H3, Hono, Node servers, and fetch-style apps.

Downloads

900

Readme

Parasito

NPM Downloads npm version License codecov Test Publish to NPM

Universal TypeScript-first HTTP testing library for Node applications.

Parasito attaches one request API to framework apps, Node servers, and fetch-style handlers. Use it to test Express, Fastify, H3, Hono, Koa, plain Node handlers, already-listening servers, or remote URLs with the same fluent assertions.

Install

pnpm add -D parasito

Quick Start

import request from 'parasito';
import express from 'express';

const app = express();

app.get('/account', (_request, response) => {
  response.json({ ok: true });
});

await request(app).get('/account').expect(200).expect({ ok: true });

Supported Targets

  • Express and connect-style handlers
  • Fastify instances
  • H3 apps
  • Hono apps
  • Koa apps
  • Plain Node request handlers
  • Node http.Server instances
  • Fetch-style functions and objects with a fetch(request) method
  • Remote HTTP URLs

API

await request(app)
  .post('/account')
  .set('authorization', 'Bearer token')
  .query({ expand: 'team' })
  .send({ name: 'Ada' })
  .expect(201)
  .expect('content-type', /json/)
  .expect((response) => {
    // Use your test runner's assertions here.
  });

Requests are promise-like, so you can await them directly. The resolved response includes:

  • status and statusCode
  • ok
  • headers as Web Headers
  • header as a plain object
  • text
  • body
  • raw

Examples

H3

import { H3 } from 'h3';
import request from 'parasito';

const app = new H3();

app.get('/account', (event) => {
  return {
    authorization: event.req.headers.get('authorization'),
    ok: true,
  };
});

await request(app).get('/account').auth('token').expect(200).expect({
  authorization: 'Bearer token',
  ok: true,
});

Hono

import { Hono } from 'hono';
import request from 'parasito';

const app = new Hono();

app.get('/account', (context) => {
  return context.json({ ok: true });
});

await request(app).get('/account').expect(200).expect({ ok: true });

Fastify

import fastify from 'fastify';
import request from 'parasito';

const app = fastify();

app.post('/account', async (request) => {
  return { body: request.body };
});

try {
  await request(app)
    .post('/account')
    .send({ name: 'Ada' })
    .expect(200)
    .expect({ body: { name: 'Ada' } });
} finally {
  await app.close();
}

Koa

import Koa from 'koa';
import request from 'parasito';

const app = new Koa();

app.use((context) => {
  context.body = { ok: true };
});

await request(app).get('/account').expect(200).expect({ ok: true });

Plain Node

import request from 'parasito';

await request((_incoming, outgoing) => {
  outgoing.setHeader('content-type', 'application/json');
  outgoing.end(JSON.stringify({ ok: true }));
})
  .get('/health')
  .expect(200)
  .expect({ ok: true });

Remote URLs

Use a string URL when the service is already running outside the current test process.

import request from 'parasito';

await request('https://api.example.com')
  .get('/health')
  .expect(200)
  .expect({ ok: true });

URL objects are supported too.

import request from 'parasito';

const api = new URL('https://api.example.com');

await request(api)
  .post('/account')
  .auth('token')
  .send({ name: 'Ada' })
  .expect(201);

Development

pnpm install
pnpm lint
pnpm typecheck
pnpm test
pnpm build