testing/cross_backend/build_test_backend_paths.ts

Per-backend filesystem layout under os.tmpdir() for cross-process tests.

Isolation matters because vitest projects can run in parallel — a shared root would mix daemon tokens across concurrently-running backends. Each backend gets its own subtree via the prefix arg (typically the BackendConfig.name).

Consumers compose: take the generic paths from build_test_backend_paths(name), add domain-specific dirs (e.g. zzz_dir, scoped_dir) under the returned root.

view source

Declarations
#

2 declarations

build_test_backend_paths
#

testing/cross_backend/build_test_backend_paths.ts view source

(prefix: string): TestBackendPaths import {build_test_backend_paths} from '@fuzdev/fuz_app/testing/cross_backend/build_test_backend_paths.js';

Build the generic path layout for a cross-process test backend. prefix is typically the BackendConfig.name (e.g. 'deno', 'rust', 'spine_stub').

prefix

type string

returns

TestBackendPaths

TestBackendPaths
#

testing/cross_backend/build_test_backend_paths.ts view source

TestBackendPaths import type {TestBackendPaths} from '@fuzdev/fuz_app/testing/cross_backend/build_test_backend_paths.js';

Generic per-backend paths every cross-process test binary needs. Consumers extend this with their own domain paths.

  • root — the per-backend subtree under os.tmpdir(). Compose consumer-specific paths under here.
  • bootstrap_token_pathFUZ_BOOTSTRAP_TOKEN_PATH; harness writes the bootstrap token here before spawn.
  • daemon_token_path — where init_daemon_token (Rust) and the TS server's daemon-token writer land the token (under {root}/run/).

root

type string

readonly

bootstrap_token_path

type string

readonly

daemon_token_path

type string

readonly

Depends on
#

Imported by
#