Skip to content

ShelfTestingOptions

Defined in: packages/core/src/config.ts:303

Testing options: what renders, how many run at once, and how screenshots are compared.

optional compare?: ShelfCompareOptions

Defined in: packages/core/src/config.ts:347

Screenshot comparison, shared by capture and the re-diff endpoint.


optional concurrency?: number

Defined in: packages/core/src/config.ts:307

Jobs this instance runs at once; auto-sized from CPU and memory when unset.


optional images?: ShelfImagesOptions

Defined in: packages/core/src/config.ts:349

Image library selection; see ShelfImagesOptions.


optional leaseSeconds?: number

Defined in: packages/core/src/config.ts:319

Lease of a job of the database queue, in seconds (default 300: 5 minutes). A running job renews it on a heartbeat (every min(30 s, lease / 3)) and on progress, so a stage that prints nothing is not redelivered while its process lives; a crashed holder’s job is claimed by another instance once the lease runs out, so a shorter lease recovers crashes sooner.


optional mode?: "auto" | "in-process" | "fork"

Defined in: packages/core/src/config.ts:345

Where captures run. auto (default) forks when workerEntry is set and the host can afford a second process; in-process never forks; fork forks regardless of the host and fails at boot if it cannot.


optional retries?: number

Defined in: packages/core/src/config.ts:312

Retries after a first failed attempt before a capture job fails for good (default 2: three attempts). One limit covers failed attempts, lost leases and forked-child crashes.


runner: CaptureRunner

Defined in: packages/core/src/config.ts:305

Pure renderer. Required: testing without a runner throws.


optional shardSize?: number

Defined in: packages/core/src/config.ts:332

Split a big build across the queue: captures (story x viewport x engine) per shard. A build of up to twice this size still renders in one piece. Unset keeps every build in one job. Needs runner. With workerEntry the forked child plans and renders shards and puts them on the database queue itself.


optional storybookUrlRateLimit?: number

Defined in: packages/core/src/config.ts:339

Requests per minute one client IP may make to the signed Storybook URL route, /_s/<token>/* (ADR 0007, decision 5). Default 6000, enough for a render fetching thousands of assets from one farm IP; a larger farm behind one address raises it. Over the limit the route answers 429 before it looks at the token, so the answer says nothing about a token’s validity.


optional workerEntry?: string

Defined in: packages/core/src/config.ts:325

Module run in a forked capture child (it calls runCaptureChild from @storyshelf/core/capture). The app consumes the queue and pushes each job to the child over IPC. Needs runner, which serves as the in-process fallback.