Package Exports
- cypress-hmr-restarter
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cypress-hmr-restarter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cypress-hmr-restarter
A rudimentary Cypress plugin(?) for automatically restarting tests after Hot Module Replacement (HMR) updates.
Setup
1. Install
npm install --save-dev cypress-hmr-restarter
2. Import
// E.g. in cypress/support/index.js
import 'cypress-hmr-restarter';
What it does
When using the Cypress Test Runner (cypress open
), after the window has loaded, it will try to connect to the webpack-dev-server
websocket, which is assumed to run at wss://<baseUrl>/sockjs-node
, and listen for messages of type invalid
.
When any of those are received, after a short delay, it will find the restart button in the sidebar and click it for you.