Cell API
    Preparing search index...

    Interface TestAppOptions

    interface TestAppOptions {
        backend?: boolean;
        devHandlers?: {
            handler: (
                req: IncomingMessage,
                res: ServerResponse,
                next: (error?: unknown) => void,
            ) => void;
            path: string;
        }[];
        disabled?: string[];
        entry?: Partial<Record<Target, string>>;
        entryName?: string;
        env?: Record<string, string | undefined>;
        external?: string[];
        extraModules?: ExtraModule[];
        format?: "esm" | "cjs";
        logger?: Logger;
        logLevel?: "info" | "warn" | "error" | "silent";
        mode?: string[];
        onRequest?: (record: DevRequestRecord) => void;
        outDir?: string;
        plugins?: PluginOption[];
        preset?: string;
        root?: string;
        runtime?: any;
        runtimeDisabled?: string[];
        single?: boolean;
        sourcemap?: boolean;
        startTimeout?: number;
        targets?: Target[];
        vite?: UserConfig;
        watchFiles?: string[];
    }

    Hierarchy

    • Omit<
          CellDevServerOptions,
          "listen"
          | "port"
          | "host"
          | "onRestart"
          | "onReload",
      >
      • TestAppOptions
    Index
    backend?: boolean

    Start the backend entry. Default true; false only loads modules on request (CellDevServer.import), as cell check does.

    devHandlers?: {
        handler: (
            req: IncomingMessage,
            res: ServerResponse,
            next: (error?: unknown) => void,
        ) => void;
        path: string;
    }[]

    Handlers of toolchain modules by path prefix, before the backend.

    disabled?: string[]

    Components left out entirely, with the dependencies only they lead to ('!name' in cell.config.ts).

    Optionalentry

    entry?: Partial<Record<Target, string>>

    Explicit entry specifiers; they win over entryName.

    entryName?: string

    Name of the backend entry to pick from the components' entries (chosen by the preset, e.g. http).

    env?: Record<string, string | undefined>

    Environment for ${env.*} in frontend configuration and CELL_FRONTEND__ / CELL_BACKEND__ overrides. Default: process.env.

    external?: string[]

    Packages the server bundle must not inline; they are copied into server/node_modules.

    extraModules?: ExtraModule[]

    DI modules added by toolchain modules, loaded after the components' own (cell.addRuntimeModule).

    format?: "esm" | "cjs"

    Server bundle format. Default esm (server/index.mjs); cjs emits server/index.cjs.

    logger?: Logger

    Vite logger, e.g. one that writes to stderr for --json.

    logLevel?: "info" | "warn" | "error" | "silent"
    mode?: string[]

    Active modes. Default ['test'] (reads cell.test.yml).

    onRequest?: (record: DevRequestRecord) => void

    Type Declaration

    outDir?: string

    Output directory, relative to the project root. Default .cell/output.

    plugins?: PluginOption[]

    Plugins of toolchain modules, after the Cell plugin.

    preset?: string

    Name of the preset that chose the options, recorded in manifest.json.

    root?: string
    runtime?: any

    Runtime of the server bundle. Default node. workerd (Cloudflare Workers) has no import.meta.url / dirname / filename: the bundle uses WORKERD_SERVER_FILE instead.

    runtimeDisabled?: string[]

    Components whose DI modules are left out; their configuration still applies.

    single?: boolean

    Embed the frontend in the server bundle (cell build --single): the server serves it from memory, and the output has no public directory. Only with both targets.

    sourcemap?: boolean
    startTimeout?: number

    How long the backend may take to start. Default 60s.

    targets?: Target[]

    Targets to build; default: backend plus the components' targets.

    vite?: UserConfig

    Merged into the Vite configuration (the vite field of cell.config.ts).

    watchFiles?: string[]

    More files whose change restarts with a new toolchain (cell.addWatchFile).