Testing¶
Unit Tests¶
Unit tests cover environment parsing, bridge config generation, launch argument handling, and local Cloak introspection tools.
Integration Tests¶
Integration tests use a fake upstream MCP child process and verify that the bridge merges local tools and forwards upstream calls unchanged.
CI runs the unit, integration, and packaged CLI E2E suites on Node.js 22-26 across Linux x64, Linux arm64, macOS arm64, macOS x64, and Windows x64.
Package Verification¶
This builds the package, runs npm pack, checks the tarball file list, installs the tarball into a temporary project, and verifies CLI --version and --help.
Package verification also validates server.json against the published MCP server schema.
Docker Smoke¶
The smoke test verifies that the built image starts and prints CLI help. CI smoke-tests Docker images for linux/amd64 and linux/arm64.
Upstream Parity¶
npm run bridge:compare
npm run bridge:compare -- cloakbrowser-mcp:dev --report bridge-parity-report.json
The parity script starts the official Playwright MCP Docker image and the CloakBrowser bridge image, compares upstream tool names, exercises the default browser tool surface on one fixture page, and verifies local Cloak introspection tools.
CI uploads the JSON parity report as an artifact for Docker build jobs and release jobs. Browser parity is currently run on linux/amd64; arm64 Docker jobs use smoke and vulnerability checks.
Security Checks¶
CI also runs CodeQL, Dependency Review, OpenSSF Scorecard, zizmor, and Trivy. These tools are free for public repositories and do not require external accounts.