import { ReelSet } from '../core/ReelSet.js'; import { SpinResult } from '../events/ReelEvents.js'; import { ColumnTarget } from '../frame/ColumnTarget.js'; import { FakeTicker } from './FakeTicker.js'; export interface TestReelSetOptions { reels?: number; /** * Visible cell count. * - `number` → uniform cells. * - `number[]` → per-reel static shape (pyramid). * * Mutually exclusive with `multiways` (which always starts at `maxCells`). */ visibleCells?: number | number[]; /** * MultiWays configuration. Mutually exclusive with `visibleCells: number[]`. * The harness sets uniform `reelExtent` and forwards `min/maxCells`. */ multiways?: { minCells: number; maxCells: number; reelExtent: number; }; symbolIds?: string[]; weights?: Record; /** Per-symbol overrides. useful for big-symbol size declarations in tests. */ symbolData?: Record>; symbolSize?: { width: number; height: number; }; symbolGap?: { x: number; y: number; }; /** Strip orientation. Defaults to 'vertical'. */ orientation?: import('../core/ReelAxis.js').Orientation; /** Travel direction for every reel. Defaults to 'forward'. */ direction?: import('../core/ReelAxis.js').Direction; /** Per-reel travel direction override (length must equal `reels`). */ directionPerReel?: import('../core/ReelAxis.js').Direction[]; /** Cylinder curvature for every reel. Omit for a flat set. */ curve?: import('../core/ReelCurve.js').ReelCurveInput; /** Per-reel curvature override (length must equal `reels`). */ curvePerReel?: import('../core/ReelCurve.js').ReelCurveInput[]; /** Where the curve's camera sits across the strip. Defaults to `'reel'`. */ curveFocus?: import('../core/ReelCurve.js').CurveFocus; /** * Cascade/tumble config, same shape as `ReelSetBuilder.tumble(...)`. Pass * `{}` for the defaults. Without this the set spins strips instead of * cascading, so a cascade test that also wants a non-default * `orientation` / `direction` has to hand-roll a builder - which is * exactly why the cascade suite had no axis coverage. */ tumble?: import('../cascade/TumbleConfig.js').TumbleConfig; /** Number of symbols above + below the visible area. Defaults to the builder default. */ bufferSymbols?: number | { start: number; end: number; }; /** Initial symbol grid. Same `ColumnTarget[]` form as `ReelSetBuilder.initialFrame`. */ initialFrame?: ColumnTarget[]; /** * gsap instance for this set. Pass a synchronous shim to drive tweens * inline instead of waiting on a real clock. Per set, so two harnesses in * one file cannot clobber each other. */ gsap?: import('../utils/gsap.js').Gsap; } export interface TestReelSetHandle { reelSet: ReelSet; ticker: FakeTicker; /** Advance the ticker by `ms` milliseconds. */ advance(ms: number, stepMs?: number): void; /** * Run one full spin that lands on `grid`. Uses `slamStop()` for deterministic * synchronous completion. Takes `ColumnTarget[]`, the same shape as * `setResult` -- there is no `string[][]` convenience form anywhere. */ spinAndLand(grid: ColumnTarget[]): Promise; /** Destroy the reel set. */ destroy(): void; } /** * Build a headless `ReelSet` wired to a `FakeTicker`. Ideal for mechanic tests. * * The returned `ReelSet` uses `HeadlessSymbol` for every registered symbol, * so no textures, renderer, or DOM are required. * * ```ts * const { reelSet, spinAndLand } = createTestReelSet({ * reels: 5, visibleCells: 3, * symbolIds: ['cherry', 'seven', 'wild'], * }); * * await spinAndLand([ * { visible: ['cherry','cherry','cherry'] }, * { visible: ['seven','seven','seven'] }, * { visible: ['wild','wild','wild'] }, * { visible: ['cherry','cherry','cherry'] }, * { visible: ['seven','seven','seven'] }, * ]); * ``` */ export declare function createTestReelSet(opts?: TestReelSetOptions): TestReelSetHandle; /** * Deterministically run a spin to a target grid. * * Internally: `spin() -> setResult(grid) -> slamStop()`. `slamStop()` bypasses * all async phases and directly places the symbols (and bypasses the * two-stage `skipSpin()` boost machine), so the returned promise resolves on * a microtask. * * Takes `ColumnTarget[]`, the same as `setResult`. There is no `string[][]` * convenience form anywhere in v2. */ export declare function spinAndLand(reelSet: ReelSet, grid: ColumnTarget[]): Promise; /** Record every occurrence of the given events in order for assertion. */ export declare function captureEvents(reelSet: ReelSet, names: Array): Array<{ event: string; args: unknown[]; }>; /** * Assert that the current visible grid equals `expected`. * * Throws a readable error showing the full current grid on mismatch. */ export declare function expectGrid(reelSet: ReelSet, expected: string[][]): void; /** * Count how many times a given symbol appears in the visible grid. * Handy for scatter/wild-count assertions. */ export declare function countSymbol(reelSet: ReelSet, symbolId: string): number; //# sourceMappingURL=testHarness.d.ts.map