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

@browsercore/testing

v0.2.0

Published

Protocol verification — RFC compliance tests, browser golden packet captures, integration tests, and benchmarking.

Readme

@browsercore/testing

npm version coverage lint

Protocol verification — RFC compliance tests, browser golden packet captures, integration tests, and benchmarking. Compares generated packets against captures from real browsers.

Responsibility

Verify that the protocol stacks produce byte-identical output to real browsers (RFC compliance) and measure their performance (benchmarking). Depends on every other @browsercore/* package but is NOT required by them — purely a test/QA tool.

What it does

The full specification is in docs/TEST-SUITE.md — 17 test categories, layered from unit checks up through real-world interoperability:

| # | Category | Layer | | --- | --- | --- | | 1 | TCP Transport | unit / loopback | | 2 | TLS Serialization | serialization | | 3 | Browser Profile Comparison | golden | | 4 | TLS Fingerprint | serialization | | 5 | HTTP/1.1 | RFC compliance | | 6 | HTTP/2 | serialization | | 7 | Header Profiles | golden | | 8 | Cookie Behavior | unit | | 9 | Compression | unit | | 10 | Redirect Handling | unit | | 11 | Session Resumption | serialization | | 12 | Connection Reuse | unit | | 13 | Error Handling | unit | | 14 | Packet Capture Comparison | golden / reference | | 15 | Real World Compatibility | reference | | 16 | Regression Tests | unit | | 17 | Performance Benchmarks | benchmark |

In short:

  • Golden packet testing — load .bin captures recorded from real browsers (Chrome 140 (tls, http2), Firefox 128 (tls)) and compare our generated TLS ClientHellos, HTTP/2 SETTINGS/HEADERS frames, etc. against them. Safari 18, Edge 140, and Firefox 135 captures are not yet collected.
  • RFC compliance — run focused test suites for TLS 1.3 (RFC 8446), HTTP/2 (RFC 9113), HTTP/1.1 (RFC 9110). These are currently stubs that throw.
  • Benchmarking — measure handshake latency and request throughput at p50/p95/p99. These are currently stubs that throw.

Public API

import {
    compareAgainstGolden,
    runTlsCompliance,
    benchmarkTlsHandshake,
    GoldenMismatchError,
} from "@browsercore/testing";

// Compare our ClientHello against a Chrome 140 capture:
const result = compareAgainstGolden(myClientHello, "chrome-140:client-hello:1" as never);
console.log(result.matches);

// Run the TLS RFC compliance suite (stub — throws until implemented):
// const tlsResult = runTlsCompliance();
// console.log(tlsResult.pass);

// Benchmark a TLS handshake over 100 iterations (stub — throws until implemented):
// const stats = benchmarkTlsHandshake(100);
// console.log("p99:", stats.p99, "ms");

Types

| Export | Kind | Purpose | | --- | --- | --- | | compareAgainstGolden() | function | Compare bytes against a golden capture | | loadGolden() | function | Load a golden capture by id | | runTlsCompliance() | function | TLS RFC 8446 compliance suite | | runHttp2Compliance() | function | HTTP/2 RFC 9113 compliance suite | | runHttp1Compliance() | function | HTTP/1.1 RFC 9110 compliance suite | | benchmarkTlsHandshake() | function | TLS handshake benchmark | | benchmarkHttp2Request() | function | HTTP/2 request benchmark | | GoldenCapture | interface | A recorded packet capture | | ComparisonResult | interface | Outcome of a golden comparison | | BenchStats | interface | p50/p95/p99 latency stats |

Dependency graph

@browsercore/testing
  └─ @browsercore/fetch  @browsercore/http2  @browsercore/http1  @browsercore/cookies
        └─ @browsercore/profiles  @browsercore/tls  @browsercore/crypto
              └─ @browsercore/transport
                    └─ node:net / node:crypto

@browsercore/testing sits at the very top — it depends on everything and nothing depends on it.