Configuration options for the CDP pool
A PoolRunnerInitializer for Vitest
// vitest.config.ts
import { defineConfig } from "vitest/config";
import { cdpPool } from "@bubblydoo/vitest-pool-cdp";
export default defineConfig({
test: {
pool: cdpPool({
// Static WebSocket URL
cdpUrl: "ws://localhost:9222/devtools/page/ABC123",
}),
},
});
Create a Vitest pool that runs tests in a CDP-connected environment.
This pool communicates with the target runtime (browser, Photoshop UXP, Electron, etc.) using the Chrome DevTools Protocol. Messages are sent via Runtime.evaluate and responses are received via consoleAPICalled events.