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

@gullerya/just-test

v5.0.3

Published

JavaScript multiplatform tests runner

Downloads

415

Readme

npm version License GitHub

Quality pipeline Codecov

just-test

just-test is a one-stop-shop library to test JS/TS code in Node and browsers with a uniform, zero-touch-per-environment syntax — the same test() you write once runs everywhere, with no environment-specific wrappers.

Features

  • Runs in Node (worker threads) and in all three major browser engines driven by Playwright: Chromium, Firefox, WebKit.
  • Three browser executor modes: iframe (default, cheap), page (per-test page — true per-test coverage), worker (Web Worker).
  • Per-test isolation across every mode.
  • Coverage out of the box (V8 → lcov), per-test where the mode allows it, session-global where it doesn't.
  • Test reporting in xUnit.
  • Selective runs: { skip }, { only }, and a files=<pattern> CLI override to run a single file or glob without editing a config.
  • One assertion library (@gullerya/just-test/assert) shared across every environment.

Install

npm install --save-dev @gullerya/just-test

Write a test

import { test } from '@gullerya/just-test';
import { assert } from '@gullerya/just-test/assert';

test('adds', () => {
	assert.strictEqual(1 + 1, 2);
});

test('async work', async () => {
	const v = await Promise.resolve(42);
	assert.strictEqual(v, 42);
});

test('skip me', () => { }, { skip: true });

test('only me', () => { }, { only: true });

test('custom timeout', async () => { }, { timeout: 10000 });

A file is a suite. There is no suite() / describe() wrapper.

Run

just-test uses a small config module per environment, consumed by a CLI.

Node:

// tests-config-nodejs.ts
export default {
	environments: [{
		node: true,
		tests:    { include: ['./tests/**/*-test.ts'] },
		coverage: { include: ['./src/**/*'] }
	}]
};

Browser (Chromium, iframe executor):

// tests-config-chromium.ts
export default {
	environments: [{
		browser:  { type: 'chromium', executors: { type: 'iframe' } },
		tests:    { include: ['./tests/**/*-test.ts'] },
		coverage: { include: ['./src/**/*'] }
	}]
};

Swap type: 'chromium' for 'firefox' or 'webkit', and executors.type for 'iframe' / 'page' / 'worker'.

Invoke:

node ./node_modules/.bin/local-runner config_file=./tests-config-nodejs.ts
node ./node_modules/.bin/local-runner config_file=./tests-config-chromium.ts

# run a subset without editing the config
node ./node_modules/.bin/local-runner \
  config_file=./tests-config-nodejs.ts \
  files='./tests/common/**/*-test.ts'

Reports land in reports/results-<env>.xml and reports/coverage-<env>.lcov, where <env> is derived from the environment (e.g. nodejs, chromium-iframe, firefox-iframe). Matrix runs do not overwrite each other.

Executor modes — trade-offs

| Mode | What it does | Coverage attribution | |---|---|---| | iframe (default) | Each test in its own iframe on a shared page. | Session-global (iframes share V8 with the host page). | | page | Each test in its own Playwright page. | Per-test. | | worker | Each test in its own Web Worker. | Not collected (workers are out of V8 coverage's reach). |

Node uses worker_threads and collects per-test coverage via the Inspector directly.

CI readiness

  • Matrix across Node, Chromium, Firefox, WebKit — run each as its own job.
  • xUnit xml and lcov artifacts are env-suffixed; upload them to Codecov or similar.
  • Non-zero exit on failure; maxFail / maxSkip are configurable gates.

Docs

  • APItest() options, CLI flags, REST pointer.
  • Architecture — backend + sandbox split, coverage pipeline, public API, dogfooding.
  • Feature gaps — what's missing and where it hurts.
  • Changelog

License

MIT