🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@feedthrough/cypress

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@feedthrough/cypress

latest
Source
npmnpm
Version
0.3.0
Version published
Weekly downloads
3
-25%
Maintainers
1
Weekly downloads
 
Created
Source

@feedthrough/cypress

feedthrough.dev · npm · GitHub

Cypress adapter for Feedthrough. Automatically injects the bridge into the app under test before each page load, so console output and network requests are captured from the very first line of page JavaScript.

Setup

npm install --save-dev @feedthrough/cypress

Add one line to your Cypress support file:

// cypress/support/e2e.ts
import { setupFeedthrough } from "@feedthrough/cypress";
setupFeedthrough();

That's it. Every cy.visit() will have the bridge running.

Options

setupFeedthrough({
  serverUrl: "ws://localhost:8765", // default
  reconnectDelay: 2000,             // ms, default
});

How it works

setupFeedthrough registers a window:before:load hook. Cypress fires this before each page load and passes the AUT (app under test) window object. The adapter sets any options on win.__feedthroughOptions, then calls win.eval(bridgeBundle) to execute the bridge in the correct window scope — so console, fetch, and XHR are patched in the AUT frame, not the Cypress runner frame.

The bridge bundle is embedded at build time (9 KB, no runtime file reads).

Running alongside the MCP server

Start the MCP server before running Cypress:

# Terminal 1
node node_modules/@feedthrough/mcp/dist/index.js

# Terminal 2
npx cypress run

An AI agent can then interact with the page while Cypress tests are running.

FAQs

Package last updated on 07 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts