OptionalconnectionTimeout in milliseconds for establishing the CDP connection.
OptionaldebugEnable debug logging.
OptionalembedWhether to embed the sourcemap as the EVAL_SOURCEMAP global variable
in the bundled code. This makes it available to code running in the CDP
context for its own use.
OptionalenableEnable error sourcemapping: remaps stack traces, task locations, and
error frames from bundled (esbuild output) positions back to original
source positions. Also injects //# sourceURL=filepath so V8
attributes eval'd code to the original file.
OptionalesbuildOptions for esbuild.
OptionalexecutionOptional function to get the execution context or session id. By default, runs Target.setAutoAttach and waits for target to be attached and uses the target's session id.
OptionalhotkeysEnable interactive hotkeys in the terminal.
Currently supports:
d: open the current CDP devtools session in Google Chrome.Optionalenabled?: booleanWhether to enable the hotkeys.
OptionalopenDevtools?: (connection: CdpConnection) => Promise<void>Function to open the devtools session (e.g. in Google Chrome).
OptionalinspectWhether to enable the inspect mode.
Defaults to process.env.UXP_INSPECT or false.
OptionalmainThis string gets passed as "UXP_MAIN_DIRECTORY" to the test file.
OptionalpluginPath to the UXP plugin directory. Defaults to the built-in "Vitest UXP Test Runner" plugin.
OptionalreuseWhether to reuse the CDP connection between tests, which is useful in watch mode.
It relies on explicit Vitest run/watch flags/commands (--run, run, --watch, watch)
and falls back to process.env.CI.
It uses signal-exit to detect when the process is exiting and disconnect the connection.
OptionalrpcTimeout in milliseconds for RPC calls to the CDP context.
OptionalrunOptional function to run after the CDP connection is established. Useful for waiting for debugger or something.
OptionalshowWhen true and enableErrorSourcemapping is also true, the original
(bundled) stack trace is preserved as error.bundledStack alongside
the remapped error.stack. Worker runtime frames are kept in the
bundled stack (no frame filtering).
Useful for debugging sourcemap remapping issues.
Options for the UXP pool.