Package Exports
- cypress
- cypress/bin/cypress
- cypress/lib/cli
- cypress/package.json
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) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cypress
Testing the way it should be
Install
Requires Node version >= 0.12
npm install --save-dev cypressOpen Cypress desktop GUI application
To open Cypress app, there are two alternatives from the command line
./node_modules/.bin/cypress open
$(npm bin)/cypress openor you can add new a script to your package.json
{
"scripts": {
"open": "cypress open"
}
}and then call npm run open
Run tests
To run e2e tests in headless mode execute $(npm bin)/cypress run
Load Cypress as an NPM module
const cy = require('cypress')
// opens desktop GUI application and returns a promise
cy.open(options)
// runs e2e tests in headless browser
// and returns a promise with test results
cy.run(options).then(results, console.error)