* temp 07/01/19 [skip ci] main lint files * use lint-staged scripts * fix all auto-fixable eslint errors * manually fix lint issues in files * temp 07/01/19 [skip ci] * bump eslint plugin versions, update circle.yml * [lint fix] remaining js files * update vscode/settings.json * add back stop-only * use stop-only for linting .onlys * fix verify_spec, build_spec * update json plugin * relint & apply corrections * fix appveyor.yml not cleansing env vars (very bad) * dont echo commit message in appveyor script * retry build & * re-add & upgrade lint-staged * update contributing docs * only let stop-only catch staged changes
Driver
This is the core JavaScript library that is loaded inside the browser that is responsible for executing Cypress commands and managing the test runtime.
Installing
The driver's dependencies can be installed with:
cd packages/driver
npm install
Building
The driver is actually consumed by the runner like any other npm module. To develop the driver and see changes reflected you need to run the watch task inside of the runner.
cd packages/runner
npm run watch
Developing
If you're developing on the driver, you'll want to run in the normal Cypress GUI mode, like you would when you're writing tests for your own Cypress projects.
## run in cypress GUI mode
cd packages/driver
npm run cypress:open
Read the runner's README.md for more information.
Running
You can also run all of the driver's tests locally. We don't really recommend this because it takes a long time, and we have this process optimized by load balancing the tests across multiple workers in CI.
It's usually easier to run the tests in the GUI, commit, and then see if anything broke elsewhere.
## run all the tests
npm run cypress:run
Testing
This project is tested with Cypress itself. It acts exactly like any other Cypress project (really we're not kidding!).
The driver uses a node server to test all of its edge cases, so first start that.
## boot the driver's server
cd packages/driver
npm start
Debugging
In the browser
localStorage.debug = "cypress:driver"