mirror of
https://github.com/cypress-io/cypress.git
synced 2026-04-30 03:51:21 -05:00
Issue 156 cli node 0.12 (#158)
* cli: set engines node > 0.12 * cli: trying to transpile using babel-register on the fly * downgrading fs-extras to 1.0.0 to let it work on Node 0.12 * lint and enforce single quote on strings * remove individual plugins * cli: include dist folder in the npm package * cli: add build step on prepublish, add readme * cli: use default options, because code is transpiled * cli: output into es5 * cli: see published size, a few missing requires * cli: replace const with var in node 0.12 * cli: cache node_modules on CircleCI * cli: back to use const that is not changed to let by eslint * cli: build separate package for npm publishing * remove postinstall step * cli: remove npm vs dev install check
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
# cypress
|
||||
|
||||
> Testing the way to should be
|
||||
|
||||
## Install
|
||||
|
||||
Requires Node version >= 0.12
|
||||
|
||||
```sh
|
||||
npm install --save-dev cypress
|
||||
```
|
||||
|
||||
## Open Cypress desktop GUI application
|
||||
|
||||
To open Cypress app, there are two alternatives from the
|
||||
command line
|
||||
|
||||
```sh
|
||||
./node_modules/.bin/cypress open
|
||||
$(npm bin)/cypress open
|
||||
```
|
||||
|
||||
or you can add new a script to your `package.json`
|
||||
|
||||
```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
|
||||
|
||||
```js
|
||||
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)
|
||||
```
|
||||
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"name": "cypress",
|
||||
"version": "0.19.2",
|
||||
"description": "Cypress.io end to end testing tool",
|
||||
"main": "lib/index.js",
|
||||
"bin": {
|
||||
"cypress": "bin/cypress"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.12.0"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "node index.js --exec install",
|
||||
"size": "t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";"
|
||||
},
|
||||
"dependencies": {
|
||||
"bluebird": "^3.4.5",
|
||||
"chalk": "^1.1.3",
|
||||
"commander": "^2.8.1",
|
||||
"common-tags": "^1.4.0",
|
||||
"debug": "^2.6.8",
|
||||
"extract-zip": "^1.6.0",
|
||||
"fs-extra": "1.0.0",
|
||||
"getos": "^2.8.4",
|
||||
"glob": "^7.0.6",
|
||||
"is-ci": "^1.0.10",
|
||||
"lodash": "^4.16.3",
|
||||
"minimist": "^1.2.0",
|
||||
"progress": "^1.1.8",
|
||||
"ramda": "^0.24.1",
|
||||
"request": "^2.81.0",
|
||||
"request-progress": "^0.3.1",
|
||||
"tmp": "0.0.31",
|
||||
"url": "^0.11.0",
|
||||
"xvfb": "cypress-io/node-xvfb",
|
||||
"yauzl": "^2.8.0"
|
||||
},
|
||||
"files": [
|
||||
"bin",
|
||||
"lib",
|
||||
"index.js"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/cypress-io/cypress.git"
|
||||
},
|
||||
"author": "Brian Mann",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/cypress-io/cypress/issues"
|
||||
},
|
||||
"homepage": "https://github.com/cypress-io/cypress"
|
||||
}
|
||||
Reference in New Issue
Block a user