ProjectSetup
The value returned by the Node setup module. One setup owns CLI-session resources; each worker owns its private app state.
Extends
Section titled “Extends”Properties
Section titled “Properties”| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
beforeExecution? |
readonly |
(context: ProjectExecution) => void | ExecutionPreparation | PromiseLike<void | ExecutionPreparation> |
Prepare one assignment before browser hooks start. Return optional JSON fixtures and a fixture transport binding. Keys must not replace static fixture keys. Preparation consumes this test’s timeout and runs once across assignment reply replays. Callbacks must honor cancellation; Dyno joins actual settlement before resource destruction, so uncooperative Node work can delay shutdown. Interrupted or failed preparation requires restarting Dyno. Only the app owns database reset and independent jobs. | ProjectWorker.beforeExecution |
createWorker? |
readonly |
(context: ProjectWorkerContext) => ProjectWorker | PromiseLike<ProjectWorker> |
Create private resources for a worker. Required for concurrent managed runs. Manual runs always use one worker. Use onCleanup while acquiring resources so partial setup is released if the factory throws. | - |
drain? |
readonly |
(context: ProjectExecution) => void | PromiseLike<void> |
Wait for work this execution started after document retirement between tests. The final successful document can remain for inspection; close app admission and join its backend work anyway. Honor cancellation. Failed draining ends the run and saves accepted results; teardown must remain safe afterward. | ProjectWorker.drain |
env? |
readonly |
Readonly<Record<string, string>> |
Environment values added to this worker’s app process. | ProjectWorker.env |
fixtures? |
readonly |
Readonly<Record<string, unknown>> |
JSON-safe IDs, paths and other values supplied to browser tests. | ProjectWorker.fixtures |
teardown? |
readonly |
() => void | PromiseLike<void> |
Release resources acquired by this worker. Setup teardown runs once after all workers close. | ProjectWorker.teardown |
webServer? |
readonly |
Partial<{ command?: string | readonly string[]; cwd?: string; env?: Readonly<Record<string, string>>; ready?: string | RegExp; reuseExistingServer?: boolean; timeout?: number; url: string; }> |
Override the app command, URL or readiness settings for this worker. | ProjectWorker.webServer |