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

@buzzr/dfs-testkit

v5.0.0

Published

Fixture builders and mock providers for @buzzr/dfs-engine consumers.

Readme

@buzzr/dfs-testkit

npm version npm downloads CI types license

Fixture builders and mock stat providers for testing @buzzr/dfs-engine integrations. Build a valid v4-canonical DFS entry in one line, override only what your test cares about, and wire a deterministic stat provider without touching the network.

Install

npm install --save-dev @buzzr/dfs-testkit @buzzr/dfs-engine

30-second quick start

Works with Vitest, Jest, or any test runner:

import { test, expect } from 'vitest';
import { createDfsEngine } from '@buzzr/dfs-engine';
import {
  makeDfsEntry,
  makeDfsLeg,
  makeGameLogEntry,
  createMockStatProvider,
} from '@buzzr/dfs-testkit';

test('a PrizePicks Power entry settles as won when both legs hit', async () => {
  const entry = makeDfsEntry({
    legs: [
      makeDfsLeg({ legId: 'leg-1', propType: 'Points', line: 20.5 }),
      makeDfsLeg({ legId: 'leg-2', propType: 'Rebounds', line: 6.5 }),
    ],
  });

  const provider = createMockStatProvider({
    'leg-1': [makeGameLogEntry({ points: '24' })],
    'leg-2': [makeGameLogEntry({ rebounds: '9' })],
  });

  const engine = createDfsEngine({ statProviders: [provider] });
  const result = await engine.settleEntry(entry, { statProviderId: provider.id });

  expect(result.status).toBe('won');
});

Every builder returns a complete, engine-valid object with sensible defaults (prizepicks / power / NBA points over), so tests only spell out what they assert.

API

| Export | Purpose | | -------------------------- | ---------------------------------------------------------------------------- | | makeDfsEntry() | A valid DfsEntryInput (PrizePicks Power, one leg) with overridable fields | | makeDfsLeg() | A valid DfsLegInput (NBA Points over 20.5) with overridable fields | | makeGameLogEntry() | A valid PlayerGameLogEntryShape boxscore row with overridable stats | | createMockStatProvider() | A deterministic StatProvider serving rows from a legId → rows map | | makeInvalidDfsEntry() | An entry with duplicate leg ids and zero stake, for validation-path tests |

Fixtures emit v4-canonical shapes (actual, status, per-leg legId keys), so anything you build here passes the engine's boundary validators — except makeInvalidDfsEntry, which is designed to fail them.

When to use this vs siblings

| You want to… | Reach for | | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------ | | Write unit tests for your own settlement integration | this package | | Prove your wiring grades identically to Buzzr's | @buzzr/dfs-engine-test-vectors | | Grade entries in production code | @buzzr/dfs-engine | | Grade entries from the command line | @buzzr/dfs-cli |

Links

License

MIT