@mdupree/cypress-staged
v0.1.10
Published
Cypress test runner, test staged files
Downloads
126
Readme
Cypress Staged
A Staged File Testing Solution for Cypress
Installation
The following installation methods are supported:
- Npm:
npm install --save-dev @mdupree/cypress-staged
- Yarn:
yarn add -D @mdupree/cypress-staged
- Pnpm:
pnpm install --save-dev @mdupree/cypress-staged
Configuration
To configure Cypress Staged, create a cystaged.config.js file with the following content:
module.exports = {
projectsPath: "ExampleProjects/*",
include: "src",
types: [ "component" ]
cypressPath: "./node_modules/.bin/cypress"
};
The following configuration options are available:
projectsPath
: The path to the projects, in case of a monorepo setup, where each project has its own Cypress configuration.include
: The directory to check for changes, and all staged files found within this directory will be tested.types
: An array of Cypress test types, including component, e2e, and unit.cypressPath
: (optional) The path to cypress executable. defaults to the projectsnode_modules/.bin/cypress
How to use
Commit some changes and run cypress-staged