# `testing.FakeSessionOptions`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `testing.d.ts` by `services/onsite-scripter/scripts/build-contract-docs.mjs`; edit the source, not this file.

Interface · `import type { FakeSessionOptions } from '@holostep-configurators/runtime-client/testing';` · stable · since 2.0.0 · section 24. /testing

What `createFakeSession` takes. A [`TextureSpec.image`](TextureSpec.image.md) the fake can read (a source with a 2D
context) is named by its pixels, as on the runtime, where an equal image keeps its ref. One it
can't (a Node stand-in without a 2D context) is named by the object: the same object written
again keeps its ref even after a redraw, which the runtime would see as a new image.

## Members

| Member | Kind | Summary |
| --- | --- | --- |
| <a id="strict"></a>[`strict?`](testing.FakeSessionOptions.strict.md) | property | Throws the runtime's errors and records every Problem, plus fake-only checks: a wrong-writer write after an `await` (tracked with AsyncLocalStorage) throws HoloScopeError; a `session` read of a target with a write… |
| <a id="seed"></a>[`seed?`](testing.FakeSessionOptions.seed.md) | property | Shuffles the orderings the contract allows. |
| <a id="transportdelayframes"></a>[`transportDelayFrames?`](testing.FakeSessionOptions.transportDelayFrames.md) | property | Reads arrive this many frames late, as on a worker transport. |
| <a id="models"></a>[`models?`](testing.FakeSessionOptions.models.md) | property | GLBs keyed by URL as written in the scene model, before `assetBaseUrl` (a twin by its stored name). |
| <a id="root"></a>[`root?`](testing.FakeSessionOptions.root.md) | property | The initial scene model: the session's first model and the history floor, as the page's first [`setSceneModel`](Writer.setSceneModel.md) after [`boot`](boot.md) is (cause 'load', `seq` 1, no undo step). |
| <a id="decodems"></a>[`decodeMs?`](testing.FakeSessionOptions.decodeMs.md) | property | Texture decode time. |
| <a id="assets"></a>[`assets?`](testing.FakeSessionOptions.assets.md) | property | Images other than GLBs, keyed by URL as written, before `assetBaseUrl`: a [`TextureSpec`](TextureSpec.md)'s `url` or `optimizedUrl`, a map slot's bare URL string (loaded exactly like `{ url }`), a stored MaterialNode's map (loaded when … |
| <a id="viewport"></a>[`viewport?`](testing.FakeSessionOptions.viewport.md) | property | The element's size, CSS px. |
| <a id="plugins"></a>[`plugins?`](testing.FakeSessionOptions.plugins.md) | property | A plug-in point for later engines (the product layer). |
| <a id="profile"></a>[`profile?`](testing.FakeSessionOptions.profile.md) | property | The runtime, device and account the fake answers for (spec section 9.4). |

## Declaration

```ts
export interface FakeSessionOptions {
  strict?: boolean;
  seed?: number;
  transportDelayFrames?: number;
  models?: Readonly<Record<string, FakeModel>>;
  root?: readonly ConfiguratorNode[];
  decodeMs?: number;
  assets?: Readonly<Record<string, {
    load?: {
      ms?: number;
      fail?: boolean;
    };
  }>>;
  viewport?: {
    width: number;
    height: number;
  };
  plugins?: ReadonlyArray<{
    name: string;
    install(session: FakeSession): void | (() => void);
  }>;
  profile?: {
    unsupported?: readonly Capability[];
    permits?: readonly string[];
    tier?: InfoReport['renderer']['tier'];
    linkedLights?: number;
    maxTextureSize?: number;
    arModes?: InfoReport['ar']['modes'];
    arPending?: boolean;
    arEscapeOnly?: boolean;
    arEnabled?: boolean;
    tryOn?: {
      kinds: readonly TryOnKind[];
      blocked?: 'switched-off' | 'unsupported';
      outcome?: 'launched' | 'camera-denied' | 'needs-tap' | 'error' | 'other';
      durationMs?: number;
    };
    problems?: ReadonlyArray<Omit<Problem, 'at' | 'docs'>>;
    session?: {
      accountId?: number;
      configuratorId?: string | null;
    };
  };
}
```

## Generic-API test (spec 3.1)

| Rule | Result |
| --- | --- |
| 1. Neutral name | pass: `FakeSessionOptions` names no product |
| 2. A precedent | not recorded: no ledger row (coverage.json) names this member or its owner |
| 3. Two apps, or labs | not recorded: no ledger row names this member or its owner |
| 4. The cheaper fix first | not recorded per member (Appendix B decides it per need) |
