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

deno-test

v1.0.3

Published

Run deno test with Node.js

Readme

deno-test

Run Deno-style tests with Node.js.

deno-test lets you use Deno.test and t.step in your test files and run them on Node.js via npx. It resolves Deno-style imports (jsr:, @std/*, import maps) and supports TypeScript out of the box.

Tip: This is especially useful for verifying Node.js compatibility of packages developed Deno-first. Run your existing Deno tests on Node.js without rewriting them.

Install

npm i -D deno-test

Usage

npx deno-test [options] [files/dirs...]

Options

| Option | Description | | --- | --- | | --filter <string> | Run only tests whose name contains the given string | | -h, --help | Show help message |

Test file patterns

When no files are specified, deno-test auto-discovers test files in the current directory (recursively) matching these patterns:

  • *_test.{ts,tsx,js,jsx,mts,mjs}
  • *.test.{ts,tsx,js,jsx,mts,mjs}
  • test.{ts,tsx,js,jsx}

Directories named node_modules, .git, and vendor are skipped.

Examples

# Run all test files in current directory
npx deno-test

# Run all test files in a specific directory
npx deno-test test/

# Run a single test file
npx deno-test test/math_test.ts

# Filter tests by name
npx deno-test --filter "add"

# Combine filter with directory
npx deno-test --filter "add" test/

Writing tests

Write tests using Deno.test just like you would for Deno:

import { assertEquals } from "@std/assert";

Deno.test("addition", () => {
  assertEquals(1 + 1, 2);
});

Deno.test("nested steps", async (t) => {
  await t.step("step 1", () => {
    assertEquals(2 * 2, 4);
  });

  await t.step("step 2", () => {
    assertEquals(3 * 3, 9);
  });
});

Import maps and jsr: specifiers work via deno.json:

{
  "imports": {
    "@std/assert": "jsr:@std/assert@^1.0.19"
  }
}

How it works

  1. The CLI discovers test files and spawns Node.js with a custom module resolution hook (register-deno-hooks.mjs) that handles Deno-style imports using @deno/loader.
  2. Test files are imported and Deno.test() calls are collected via @deno/shim-deno-test.
  3. Collected tests are registered with Node.js's built-in node:test runner, with t.step() mapped to node:test's subtests.

Requirements

  • Node.js >= 23.6.0

Note: This tool uses module.registerHooks(), a synchronous module resolution hook API added in Node.js 23.6.0.

License

MIT