Files
cypress/cli
renovate[bot] a3daee100b fix(deps): update dependency request-progress to version .x 🌟 (#4584)
* fix(deps): update request-progress to 3.0.0 🌟

* Added method to utils to convert percent value to percentage

- Wrote unit tests for both calculateETA and the percent to percentage
conversion


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2019-07-01 09:07:33 +06:30
..
2017-09-04 00:00:41 -04:00
2017-09-02 22:51:07 -04:00

CLI

The CLI is used to build Cypress npm module to be run within a terminal.

The CLI has the following responsibilities:

  • Allow users to print CLI commands
  • Allow users to install the Cypress executable
  • Allow users to print their current Cypress version
  • Allow users to run Cypress tests from the terminal
  • Allow users to open Cypress in the interactive GUI.
  • Allow users to verifies that Cypress is installed correctly and executable
  • Allow users to manages the Cypress binary cache

Installing

The CLI's dependencies can be installed with:

cd cli
npm install

Building

See scripts/build.js. Note that the built NPM package will include NPM_README.md as its public README file.

Testing

Automated

You can run unit tests with:

npm test

This will take and compare snapshots of the CLI output. To update snapshots, see snap-shot-it instructions: https://github.com/bahmutov/snap-shot-it#advanced-use

Manual

To build and test an NPM package:

  • npm install
  • npm run build

This creates build folder.

  • cd build; npm pack

This creates an archive, usually named cypress-<version>.tgz. You can install this archive from other projects, but because there is no corresponding binary yet (probably), skip binary download. For example from inside cypress-example-kitchensink folder

npm i ~/{your-dirs}/cypress/cli/build/cypress-3.3.1.tgz --ignore-scripts

Which installs the tgz file we have just built from folder Users/jane-lane/{your-dirs}/cypress/cli/build.