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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@durable-streams/server-conformance-tests

v0.1.4

Published

Conformance test suite for Durable Streams server implementations

Readme

@durable-streams/server-conformance-tests

Protocol compliance test suite for Durable Streams server implementations.

This package provides a comprehensive test suite to verify that a server correctly implements the Durable Streams protocol.

Installation

npm install @durable-streams/server-conformance-tests
# or
pnpm add @durable-streams/server-conformance-tests

CLI Usage

The easiest way to run conformance tests against your server:

Run Once (CI)

npx @durable-streams/server-conformance-tests --run http://localhost:4437

Watch Mode (Development)

Watch source files and automatically rerun tests when changes are detected:

npx @durable-streams/server-conformance-tests --watch src http://localhost:4437

# Watch multiple directories
npx @durable-streams/server-conformance-tests --watch src lib http://localhost:4437

CLI Options

Usage:
  npx @durable-streams/server-conformance-tests --run <url>
  npx @durable-streams/server-conformance-tests --watch <path> [path...] <url>

Options:
  --run              Run tests once and exit (for CI)
  --watch <paths>    Watch source paths and rerun tests on changes (for development)
  --help, -h         Show help message

Arguments:
  <url>              Base URL of the Durable Streams server to test against

Programmatic Usage

You can also run the conformance tests programmatically within your own test suite:

import { runConformanceTests } from "@durable-streams/server-conformance-tests"

// In your test file (e.g., with vitest)
describe("My Server Implementation", () => {
  const config = { baseUrl: "" }

  beforeAll(async () => {
    // Start your server
    const server = await startMyServer({ port: 0 })
    config.baseUrl = server.url
  })

  afterAll(async () => {
    await server.stop()
  })

  // Run all conformance tests
  runConformanceTests(config)
})

CI Integration

Add conformance tests to your CI pipeline:

# GitHub Actions example
jobs:
  conformance:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: "20"

      - name: Install dependencies
        run: npm install

      - name: Start server
        run: npm run start:server &

      - name: Wait for server
        run: npx wait-on http://localhost:4437

      - name: Run conformance tests
        run: npx @durable-streams/server-conformance-tests --run http://localhost:4437

Test Coverage

The conformance test suite covers:

  • Basic Stream Operations - Create, delete, idempotent operations
  • Append Operations - String data, chunking, sequence ordering
  • Read Operations - Empty/full streams, offset reads
  • Long-Poll Operations - Data waiting, immediate returns
  • HTTP Protocol - Headers, status codes, content negotiation
  • TTL and Expiry - TTL/Expires-At handling
  • Case-Insensitivity - Content-type, header casing
  • Content-Type Validation - Match enforcement
  • HEAD Metadata - Metadata-only responses
  • Offset Validation - Malformed offsets, resumable reads
  • Protocol Edge Cases - Empty bodies, binary data, monotonic progression
  • Byte-Exactness - Data integrity guarantees
  • Caching and ETag - ETag and 304 responses
  • Chunking and Large Payloads - Pagination, large files
  • Property-Based Fuzzing - Random append/read sequences
  • Malformed Input Fuzzing - Security-focused tests
  • Read-Your-Writes Consistency - Immediate visibility after writes
  • SSE Mode - Server-sent events streaming
  • JSON Mode - JSON serialization and batching

License

Apache 2.0