🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@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

Versioned engine regression fixtures for @buzzr/dfs-engine; not official operator conformance.

latest
Source
npmnpm
Version
5.1.0
Version published
Maintainers
2
Created
Source

@buzzr/dfs-engine-test-vectors

npm version npm downloads CI types license

Versioned engine regression fixtures for @buzzr/dfs-engine. Each vector is an { entry, gameLogsByLegId, expected } triple: a synthetic entry, deterministic provider rows, and the detailed outcome produced by the matching engine version.

Replay these fixtures when wiring stat providers, persistence, or settlement orchestration to detect drift from that engine contract. They are not official operator conformance, do not certify current PrizePicks or Underdog rules, and do not replace the displayed entry terms or an operator ruling.

Install

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

The fixtures and engine are pinned together because each vector describes one specific engine contract. Upgrade and review both versions together.

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 engine regression vectors', () => {
  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).toMatchObject({
      status: v.expected.status,
      multiplier: v.expected.multiplier,
      payout: v.expected.payout,
      pendingReasons: v.expected.pendingReasons,
      policyVersion: v.expected.policyVersion,
      policyStatus: v.expected.policyStatus,
      payoutTable: v.expected.payoutTable,
      confidence: v.expected.confidence,
      explanationCodes: v.expected.explanationCodes,
    });
    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

VectorEngine behavior pinned
prizepicks_power_2leg_all_winTwo NBA overs win under the PrizePicks compatibility profile
prizepicks_power_2leg_one_lossOne missed leg loses an all-or-nothing compatibility entry
underdog_standard_2leg_under_hitsTwo unders win under the unverified Underdog compatibility profile
prizepicks_power_all_push_refundAll exact-line pushes remove every leg and return the stake
prizepicks_power_dnp_reprices_survivorsAn explicit DNP removes a leg and reprices the surviving entry
prizepicks_power_missing_supported_stat_pendingA supported prop with a missing value remains pending as missing_stat
prizepicks_power_unsupported_prop_pendingAn unsupported prop remains pending distinctly from missing data
prizepicks_flex_duplicate_player_warningDuplicate-player validation warning survives a completed settlement
prizepicks_power_wrong_date_provider_row_pendingA provider row outside the game-date window is not silently selected
prizepicks_power_ambiguous_same_day_rows_pendingTwo plausible same-day rows remain pending instead of being chosen arbitrarily
prizepicks_power_current_3leg_payoutThe reviewed standard table effective 2026-07-02 resolves a three-pick Power entry at 6×
ExportPurpose
TEST_VECTORSReadonly array of engine-verified TestVector triples
TestVectorType: { name, description, entry, gameLogsByLegId, expected }
ExpectedSettlementExpected payout, policy, verification, provenance, validation, and audit contract
ExpectedLegOutcomeExpected per-leg status, actual, pending reason, and provider source

When to use this vs siblings

You want to…Reach for
Detect drift from a matching engine versionthis 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

Compatibility and support

Node.js >= 22 is supported. Import the supported API from @buzzr/dfs-engine-test-vectors. Deep src/* and dist/* imports are unsupported.

Report vulnerabilities privately through SECURITY.md. The versioning and support policy defines the supported runtime and SemVer contract.

License

MIT

Keywords

dfs

FAQs

Package last updated on 16 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts