testing.FakeSessionOptions ​Contract 2.0.0 · package sha256
a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e· generated fromtesting.d.tsbyservices/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 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.
| Member | Kind | Summary |
|---|---|---|
strict? |
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… |
seed? |
property | Shuffles the orderings the contract allows. |
transportDelayFrames? |
property | Reads arrive this many frames late, as on a worker transport. |
models? |
property | GLBs keyed by URL as written in the scene model, before assetBaseUrl (a twin by its stored name). |
root? |
property | The initial scene model: the session's first model and the history floor, as the page's first setSceneModel after boot is (cause 'load', seq 1, no undo step). |
decodeMs? |
property | Texture decode time. |
assets? |
property | Images other than GLBs, keyed by URL as written, before assetBaseUrl: a TextureSpec's url or optimizedUrl, a map slot's bare URL string (loaded exactly like { url }), a stored MaterialNode's map (loaded when … |
viewport? |
property | The element's size, CSS px. |
plugins? |
property | A plug-in point for later engines (the product layer). |
profile? |
property | The runtime, device and account the fake answers for (spec section 9.4). |
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;
};
};
}
| 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) |