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

@webstir-io/webstir-testing

v0.1.5

Published

Testing runtime and CLI for Webstir TypeScript projects.

Readme

@webstir-io/webstir-testing

Unified test runner, runtime helpers, and CLI for Webstir TypeScript workspaces. Provides the binaries used by the Webstir CLI and the test API consumed inside generated specs.

Status

  • Experimental test host and CLI — event shapes, flags, and discovery rules may change as the ecosystem evolves.
  • Intended for Webstir workspaces and experimentation, not yet as a general-purpose, production-stable test runner.

Quick Start

  1. Install
    npm install --save-dev @webstir-io/webstir-testing
  2. Run tests
    npx webstir-testing --workspace /absolute/path/to/workspace

Requires Node.js 20.18.x or newer and assumes TypeScript has already produced compiled output in build/**/tests/.

Workspace Layout

workspace/
  src/
    frontend/tests/*.test.ts
    backend/**/tests/*.test.ts
  build/
    frontend/tests/*.test.js
    backend/**/tests/*.test.js

Compile with tsc (or the workspace build) before invoking the runner; the CLI executes JavaScript from build/.

CLI Commands

Binary aliases: webstir-testing, webstir-testing-runner, webstir-testing-add (legacy aliases: webstir-test, webstir-test-runner, webstir-test-add).

| Command | Description | Notable options | |---------|-------------|-----------------| | webstir-testing / webstir-testing test | Discovers and runs the suite once. | --workspace <absolute path> (defaults to cwd). | | webstir-testing watch | Watches src/ and reruns on change. | --workspace, --debounce <ms> (default 150). | | webstir-testing-add <name> | Scaffolds a sample test file. | --workspace to control destination. |

Tips:

  • Set WEBSTIR_TEST_RUNTIME=<frontend|backend|all> to limit discovery to a single runtime (defaults to all). This mirrors the flag exposed through the .NET CLI (webstir test --runtime backend).

Event Stream

Runner events emit to stdout prefixed with WEBSTIR_TEST followed by JSON. Event types include start, result, summary, watch-iteration, log, and error. Downstream tooling can parse these payloads using @webstir-io/testing-contract.

Runtime & APIs

import { test, assert } from '@webstir-io/webstir-testing';

test('adds numbers', () => {
  assert.equal(42, add(40, 2));
});
  • test(name, fn) registers sync or async callbacks.
  • assert exposes isTrue, equal, and fail (throws AssertionError).
  • discoverTestManifest(workspace) builds the manifest consumed by the CLI.
  • createDefaultProviderRegistry() returns a ProviderRegistry with default runtime handlers (frontend, backend).
  • run(files) executes compiled modules and returns a RunnerSummary.

All exported types align with @webstir-io/testing-contract.

Maintainer Workflow

npm install
npm run clean          # remove dist artifacts
npm run build          # TypeScript → dist/
npm run test
npm run smoke
# Release helper (bumps version and pushes a package-scoped release tag)
npm run release -- patch
  • Add integration fixtures under tests/ before enabling automated suites.
  • Ensure CI runs npm ci, npm run clean, npm run build, npm run test, and npm run smoke prior to publishing.
  • The release workflow publishes to npm using trusted publishing (id-token: write + provenance).

Troubleshooting

  • “No tests found under src//tests/.”** — ensure compiled JavaScript exists in build/**/tests/.
  • ESM/CommonJS errors — the runtime attempts CommonJS first and falls back to dynamic import(); misconfigured TypeScript output may still surface syntax errors.
  • Watch mode exits non-zero — inspect emitted WEBSTIR_TEST events for failures.

Community & Support

  • Code of Conduct: https://github.com/webstir-io/.github/blob/main/CODE_OF_CONDUCT.md
  • Contributing guidelines: https://github.com/webstir-io/.github/blob/main/CONTRIBUTING.md
  • Security policy and disclosure process: https://github.com/webstir-io/.github/blob/main/SECURITY.md
  • Support expectations and contact channels: https://github.com/webstir-io/.github/blob/main/SUPPORT.md

License

MIT © Webstir