New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@buzzr/dfs-engine-test-vectors

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@buzzr/dfs-engine-test-vectors

Canonical reference fixtures for @buzzr/dfs-engine — golden entry/gamelog/settlement triples so external integrators can prove their wiring matches Buzzr's.

Source
npmnpm
Version
5.0.0
Version published
Weekly downloads
2
-84.62%
Maintainers
2
Weekly downloads
 
Created
Source

@buzzr/dfs-engine-test-vectors

npm version npm downloads CI types license

Golden fixtures that prove your @buzzr/dfs-engine integration grades identically to Buzzr's production pipeline. Each vector is an { entry, gameLogsByLegId, expected } triple — a real slip shape, the boxscore rows that settle it, and the exact settlement outcome — verified against the engine in this package's own test suite.

If you wire your own stat providers, persistence, or settlement orchestration around the engine, replaying these vectors in your CI turns "we think our wiring is right" into a passing conformance test.

Install

npm install --save-dev @buzzr/dfs-engine-test-vectors @buzzr/dfs-engine

30-second quick start

import { describe, expect, test } from 'vitest';
import { createDfsEngine, defineStatProvider } from '@buzzr/dfs-engine';
import { TEST_VECTORS } from '@buzzr/dfs-engine-test-vectors';

describe('my-integration conformance', () => {
  test.each(TEST_VECTORS.map((v) => [v.name, v] as const))('%s', async (_name, v) => {
    const provider = defineStatProvider({
      id: 'mine',
      getGameLog: ({ leg }) => v.gameLogsByLegId[leg.legId] ?? [],
    });
    const engine = createDfsEngine({ statProviders: [provider] });

    const result = await engine.settleEntry(v.entry, { statProviderId: 'mine' });

    expect(result.status).toBe(v.expected.status);
    for (const expectedLeg of v.expected.legs) {
      const leg = result.legs.find((l) => l.legId === expectedLeg.legId);
      expect(leg?.status).toBe(expectedLeg.status);
      expect(leg?.actual).toBe(expectedLeg.actual);
    }
  });
});

What's inside

VectorCovers
prizepicks_power_2leg_all_winPrizePicks Power, both NBA overs clear the line — settles won
prizepicks_power_2leg_one_lossAll-or-nothing: one missed leg loses the whole Power entry
underdog_standard_2leg_under_hitsUnderdog Standard, both unders hit — settles won
ExportPurpose
TEST_VECTORSReadonly array of verified TestVector triples
TestVectorType: { name, description, entry, gameLogsByLegId, expected }
ExpectedLegOutcomeType: expected per-leg { legId, status, actual }

When to use this vs siblings

You want to…Reach for
Prove your integration matches Buzzr's gradingthis package
Build custom fixtures for your own test scenarios@buzzr/dfs-testkit
Grade entries in production code@buzzr/dfs-engine
Spot-check a single entry from the command line@buzzr/dfs-cli

License

MIT

Keywords

dfs

FAQs

Package last updated on 07 Jul 2026

Related posts