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

@questi0nm4rk/feats

v1.0.1

Published

BDD/Gherkin test framework for Bun — feature testing with typed step definitions

Readme

@questi0nm4rk/feats

BDD/Gherkin test framework for Bun — feature testing with typed step definitions.

Install

bun add @questi0nm4rk/feats

Quick example

tests/features/checkout.feature

Feature: Shopping cart checkout

  Scenario: Add item and checkout
    Given the cart is empty
    When I add "Widget" to the cart
    Then the cart should have 1 item
    And the total should be 9.99

tests/features/checkout.steps.ts

import { Given, When, Then } from "@questi0nm4rk/feats";

interface CartWorld {
  items: { name: string; price: number }[];
  [key: string]: unknown;
}

Given("the cart is empty", (world: CartWorld) => {
  world.items = [];
});

When("I add {string} to the cart", (world: CartWorld, name: unknown) => {
  if (typeof name !== "string") throw new Error("expected string");
  world.items.push({ name, price: 9.99 });
});

Then("the cart should have {int} item", (world: CartWorld, count: unknown) => {
  if (typeof count !== "number") throw new Error("expected number");
  expect(world.items.length).toBe(count);
});

Then("the total should be {float}", (world: CartWorld, total: unknown) => {
  if (typeof total !== "number") throw new Error("expected number");
  const sum = world.items.reduce((acc, item) => acc + item.price, 0);
  expect(sum).toBe(total);
});

tests/features/checkout.test.ts

import { loadFeatures, runFeatures } from "@questi0nm4rk/feats";
import "./checkout.steps";

const features = await loadFeatures("tests/features/*.feature");
runFeatures(features);

Run with:

bun test

Exports

| Export | Description | |--------|-------------| | Given, When, Then, Step | Register step definitions | | defineParameterType | Register custom cucumber parameter types | | Before, After | Lifecycle hooks (with optional tag filter) | | loadFeatures(glob) | Parse .feature files matching a glob | | parseFeature(source, uri) | Parse a feature from a string | | runFeatures(features, opts?) | Generate bun:test describe/test blocks | | setupFixture(name, opts) | Copy a fixture directory to a temp dir | | composeFixtures(names, opts) | Merge multiple fixture dirs into one temp dir | | runCli(command, args?, opts?) | Run a CLI process and capture output | | assertConfig(filePath, expected, opts?) | Assert JSON/TOML/YAML config file contents | | assertOutput(result, expectations) | Assert CLI output (stdout, stderr, exitCode) | | createRng(seed?) | Create a seeded deterministic RNG |

Bun plugin

Load .feature files directly as JS modules:

// bunfig.toml or Bun.build config
import featsPlugin from "@questi0nm4rk/feats/plugin";

Bun.build({
  plugins: [featsPlugin],
  // ...
});