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

@aphrody/bxc-test

v0.1.1

Published

Playwright-compatible browser/site test runner for Bun, backed by bxc's native in-process CDP layer. Zero-spawn, no Chromium bundling.

Downloads

189

Readme

@aphrody/bxc-test

Playwright-compatible browser/site test runner for Bun, backed by bxc's native in-process CDP layer (src/cdp/**) and the bun:test runner. No Chromium bundling, no Playwright dependency — zero-spawn in the static profile.

import { test, expect } from "@aphrody/bxc-test";

test("homepage renders", async ({ page }) => {
  await page.goto("http://localhost:3000/");
  await expect(page.getByRole("heading")).toHaveText("Welcome");
  await expect(page.getByTestId("cart")).toHaveCount(1);
  await expect(page.locator("#submit")).toBeEnabled();
});

Run it with Bun's native runner:

bun test test/

Why

@playwright/test spawns Chromium and speaks CDP over a WebSocket. bxc already is a CDP engine: src/cdp/** answers CDP method calls in-process, and src/api/browser.ts drives navigation + DOM queries with no external binary. This package mirrors the @playwright/test author surface (test/expect/ page/locator/getBy*) on top of that engine, so site tests run entirely inside Bun.

Surface

  • Runner: test, test.describe, describe, beforeEach/afterEach/ beforeAll/afterAll, mock — re-exported from bun:test. test(name, async ({ page }) => …) injects a fresh TestPage, closed automatically.
  • Page: goto, setContent, title, content, url, locator, getByTestId, getByRole, getByText, getByLabel, getByPlaceholder, getByAltText, getByTitle.
  • Locator (BxcLocator): click, fill, textContent, getAttribute, isVisible, count, waitFor, filter({ hasText }), first/last/nth.
  • Web-first expect(locator) (auto-retrying): toBeVisible, toBeHidden, toHaveText, toContainText, toHaveCount, toHaveAttribute, toBeEnabled, toBeDisabled, and .not. expect(value) on non-locators falls through to bun:test.
  • Config: defineConfig({ use: { baseURL, testIdAttribute, profile }, expect: { timeout } }) — a playwright.config.ts-shaped object consumed by createTest(config).

Compatibility & limits

bxc's default static profile has no JS engine and no layout, so a few things are adapted or not-yet:

  • getByRole uses a role→CSS heuristic + text filter, not a full ARIA tree.
  • "Visible" means attached and not hidden (hidden / display:none / aria-hidden), not "non-zero box" — there is no layout in static.
  • toHaveScreenshot / trace viewer / video need a rendering engine (use the fast Lightpanda profile) and are roadmap, not stubbed.

Full matrix and design rationale: ../../docs/test-package-plan.md.