cypress 3.1.4 → 3.3.1
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/cli.js +54 -15
- package/lib/errors.js +89 -41
- package/lib/exec/open.js +4 -0
- package/lib/exec/spawn.js +98 -19
- package/lib/exec/xvfb.js +38 -10
- package/lib/tasks/download.js +16 -1
- package/lib/tasks/verify.js +92 -39
- package/lib/util.js +68 -3
- package/package.json +18 -33
- package/types/blob-util/LICENSE +21 -0
- package/types/blob-util/README.md +16 -0
- package/types/blob-util/index.d.ts +97 -0
- package/types/bluebird/LICENSE +21 -0
- package/types/bluebird/README.md +16 -0
- package/types/bluebird/index.d.ts +1315 -0
- package/types/chai/LICENSE +21 -0
- package/types/chai/README.md +16 -0
- package/types/chai/index.d.ts +1624 -0
- package/types/chai-jquery/LICENSE +21 -0
- package/types/chai-jquery/README.md +16 -0
- package/types/chai-jquery/index.d.ts +2587 -0
- package/types/{blob-util.d.ts → cy-blob-util.d.ts} +1 -1
- package/types/{bluebird.d.ts → cy-bluebird.d.ts} +1 -1
- package/types/{chai.d.ts → cy-chai.d.ts} +1 -2
- package/types/cy-minimatch.d.ts +96 -0
- package/types/cy-moment.d.ts +7 -0
- package/types/cypress-npm-api.d.ts +504 -0
- package/types/index.d.ts +403 -125
- package/types/jquery/LICENSE +21 -0
- package/types/jquery/README.md +16 -0
- package/types/jquery/index.d.ts +8560 -0
- package/types/lodash/LICENSE +21 -0
- package/types/lodash/README.md +16 -0
- package/types/lodash/add.d.ts +2 -0
- package/types/lodash/after.d.ts +2 -0
- package/types/lodash/ary.d.ts +2 -0
- package/types/lodash/assign.d.ts +2 -0
- package/types/lodash/assignIn.d.ts +2 -0
- package/types/lodash/assignInWith.d.ts +2 -0
- package/types/lodash/assignWith.d.ts +2 -0
- package/types/lodash/at.d.ts +2 -0
- package/types/lodash/attempt.d.ts +2 -0
- package/types/lodash/before.d.ts +2 -0
- package/types/lodash/bind.d.ts +2 -0
- package/types/lodash/bindAll.d.ts +2 -0
- package/types/lodash/bindKey.d.ts +2 -0
- package/types/lodash/camelCase.d.ts +2 -0
- package/types/lodash/capitalize.d.ts +2 -0
- package/types/lodash/castArray.d.ts +2 -0
- package/types/lodash/ceil.d.ts +2 -0
- package/types/lodash/chain.d.ts +2 -0
- package/types/lodash/chunk.d.ts +2 -0
- package/types/lodash/clamp.d.ts +2 -0
- package/types/lodash/clone.d.ts +2 -0
- package/types/lodash/cloneDeep.d.ts +2 -0
- package/types/lodash/cloneDeepWith.d.ts +2 -0
- package/types/lodash/cloneWith.d.ts +2 -0
- package/types/lodash/common/array.d.ts +3708 -0
- package/types/lodash/common/collection.d.ts +2575 -0
- package/types/lodash/common/common.d.ts +270 -0
- package/types/lodash/common/date.d.ts +27 -0
- package/types/lodash/common/function.d.ts +1489 -0
- package/types/lodash/common/lang.d.ts +1936 -0
- package/types/lodash/common/math.d.ts +532 -0
- package/types/lodash/common/number.d.ts +178 -0
- package/types/lodash/common/object.d.ts +3905 -0
- package/types/lodash/common/seq.d.ts +196 -0
- package/types/lodash/common/string.d.ts +1059 -0
- package/types/lodash/common/util.d.ts +1463 -0
- package/types/lodash/compact.d.ts +2 -0
- package/types/lodash/concat.d.ts +2 -0
- package/types/lodash/cond.d.ts +2 -0
- package/types/lodash/conformsTo.d.ts +2 -0
- package/types/lodash/constant.d.ts +2 -0
- package/types/lodash/countBy.d.ts +2 -0
- package/types/lodash/create.d.ts +2 -0
- package/types/lodash/curry.d.ts +2 -0
- package/types/lodash/curryRight.d.ts +2 -0
- package/types/lodash/debounce.d.ts +2 -0
- package/types/lodash/deburr.d.ts +2 -0
- package/types/lodash/defaultTo.d.ts +2 -0
- package/types/lodash/defaults.d.ts +2 -0
- package/types/lodash/defaultsDeep.d.ts +2 -0
- package/types/lodash/defer.d.ts +2 -0
- package/types/lodash/delay.d.ts +2 -0
- package/types/lodash/difference.d.ts +2 -0
- package/types/lodash/differenceBy.d.ts +2 -0
- package/types/lodash/differenceWith.d.ts +2 -0
- package/types/lodash/divide.d.ts +2 -0
- package/types/lodash/drop.d.ts +2 -0
- package/types/lodash/dropRight.d.ts +2 -0
- package/types/lodash/dropRightWhile.d.ts +2 -0
- package/types/lodash/dropWhile.d.ts +2 -0
- package/types/lodash/each.d.ts +2 -0
- package/types/lodash/eachRight.d.ts +2 -0
- package/types/lodash/endsWith.d.ts +2 -0
- package/types/lodash/entries.d.ts +2 -0
- package/types/lodash/entriesIn.d.ts +2 -0
- package/types/lodash/eq.d.ts +2 -0
- package/types/lodash/escape.d.ts +2 -0
- package/types/lodash/escapeRegExp.d.ts +2 -0
- package/types/lodash/every.d.ts +2 -0
- package/types/lodash/extend.d.ts +2 -0
- package/types/lodash/extendWith.d.ts +2 -0
- package/types/lodash/fill.d.ts +2 -0
- package/types/lodash/filter.d.ts +2 -0
- package/types/lodash/find.d.ts +2 -0
- package/types/lodash/findIndex.d.ts +2 -0
- package/types/lodash/findKey.d.ts +2 -0
- package/types/lodash/findLast.d.ts +2 -0
- package/types/lodash/findLastIndex.d.ts +2 -0
- package/types/lodash/findLastKey.d.ts +2 -0
- package/types/lodash/first.d.ts +2 -0
- package/types/lodash/flatMap.d.ts +2 -0
- package/types/lodash/flatMapDeep.d.ts +2 -0
- package/types/lodash/flatMapDepth.d.ts +2 -0
- package/types/lodash/flatten.d.ts +2 -0
- package/types/lodash/flattenDeep.d.ts +2 -0
- package/types/lodash/flattenDepth.d.ts +2 -0
- package/types/lodash/flip.d.ts +2 -0
- package/types/lodash/floor.d.ts +2 -0
- package/types/lodash/flow.d.ts +2 -0
- package/types/lodash/flowRight.d.ts +2 -0
- package/types/lodash/forEach.d.ts +2 -0
- package/types/lodash/forEachRight.d.ts +2 -0
- package/types/lodash/forIn.d.ts +2 -0
- package/types/lodash/forInRight.d.ts +2 -0
- package/types/lodash/forOwn.d.ts +2 -0
- package/types/lodash/forOwnRight.d.ts +2 -0
- package/types/lodash/fp/F.d.ts +2 -0
- package/types/lodash/fp/T.d.ts +2 -0
- package/types/lodash/fp/__.d.ts +3 -0
- package/types/lodash/fp/add.d.ts +2 -0
- package/types/lodash/fp/after.d.ts +2 -0
- package/types/lodash/fp/all.d.ts +2 -0
- package/types/lodash/fp/allPass.d.ts +2 -0
- package/types/lodash/fp/always.d.ts +2 -0
- package/types/lodash/fp/any.d.ts +2 -0
- package/types/lodash/fp/anyPass.d.ts +2 -0
- package/types/lodash/fp/apply.d.ts +2 -0
- package/types/lodash/fp/ary.d.ts +2 -0
- package/types/lodash/fp/assign.d.ts +2 -0
- package/types/lodash/fp/assignAll.d.ts +2 -0
- package/types/lodash/fp/assignAllWith.d.ts +2 -0
- package/types/lodash/fp/assignIn.d.ts +2 -0
- package/types/lodash/fp/assignInAll.d.ts +2 -0
- package/types/lodash/fp/assignInAllWith.d.ts +2 -0
- package/types/lodash/fp/assignInWith.d.ts +2 -0
- package/types/lodash/fp/assignWith.d.ts +2 -0
- package/types/lodash/fp/assoc.d.ts +2 -0
- package/types/lodash/fp/assocPath.d.ts +2 -0
- package/types/lodash/fp/at.d.ts +2 -0
- package/types/lodash/fp/attempt.d.ts +2 -0
- package/types/lodash/fp/before.d.ts +2 -0
- package/types/lodash/fp/bind.d.ts +2 -0
- package/types/lodash/fp/bindAll.d.ts +2 -0
- package/types/lodash/fp/bindKey.d.ts +2 -0
- package/types/lodash/fp/camelCase.d.ts +2 -0
- package/types/lodash/fp/capitalize.d.ts +2 -0
- package/types/lodash/fp/castArray.d.ts +2 -0
- package/types/lodash/fp/ceil.d.ts +2 -0
- package/types/lodash/fp/chunk.d.ts +2 -0
- package/types/lodash/fp/clamp.d.ts +2 -0
- package/types/lodash/fp/clone.d.ts +2 -0
- package/types/lodash/fp/cloneDeep.d.ts +2 -0
- package/types/lodash/fp/cloneDeepWith.d.ts +2 -0
- package/types/lodash/fp/cloneWith.d.ts +2 -0
- package/types/lodash/fp/compact.d.ts +2 -0
- package/types/lodash/fp/complement.d.ts +2 -0
- package/types/lodash/fp/compose.d.ts +2 -0
- package/types/lodash/fp/concat.d.ts +2 -0
- package/types/lodash/fp/cond.d.ts +2 -0
- package/types/lodash/fp/conforms.d.ts +2 -0
- package/types/lodash/fp/conformsTo.d.ts +2 -0
- package/types/lodash/fp/constant.d.ts +2 -0
- package/types/lodash/fp/contains.d.ts +2 -0
- package/types/lodash/fp/convert.d.ts +15 -0
- package/types/lodash/fp/countBy.d.ts +2 -0
- package/types/lodash/fp/create.d.ts +2 -0
- package/types/lodash/fp/curry.d.ts +2 -0
- package/types/lodash/fp/curryN.d.ts +2 -0
- package/types/lodash/fp/curryRight.d.ts +2 -0
- package/types/lodash/fp/curryRightN.d.ts +2 -0
- package/types/lodash/fp/debounce.d.ts +2 -0
- package/types/lodash/fp/deburr.d.ts +2 -0
- package/types/lodash/fp/defaultTo.d.ts +2 -0
- package/types/lodash/fp/defaults.d.ts +2 -0
- package/types/lodash/fp/defaultsAll.d.ts +2 -0
- package/types/lodash/fp/defaultsDeep.d.ts +2 -0
- package/types/lodash/fp/defaultsDeepAll.d.ts +2 -0
- package/types/lodash/fp/defer.d.ts +2 -0
- package/types/lodash/fp/delay.d.ts +2 -0
- package/types/lodash/fp/difference.d.ts +2 -0
- package/types/lodash/fp/differenceBy.d.ts +2 -0
- package/types/lodash/fp/differenceWith.d.ts +2 -0
- package/types/lodash/fp/dissoc.d.ts +2 -0
- package/types/lodash/fp/dissocPath.d.ts +2 -0
- package/types/lodash/fp/divide.d.ts +2 -0
- package/types/lodash/fp/drop.d.ts +2 -0
- package/types/lodash/fp/dropLast.d.ts +2 -0
- package/types/lodash/fp/dropLastWhile.d.ts +2 -0
- package/types/lodash/fp/dropRight.d.ts +2 -0
- package/types/lodash/fp/dropRightWhile.d.ts +2 -0
- package/types/lodash/fp/dropWhile.d.ts +2 -0
- package/types/lodash/fp/each.d.ts +2 -0
- package/types/lodash/fp/eachRight.d.ts +2 -0
- package/types/lodash/fp/endsWith.d.ts +2 -0
- package/types/lodash/fp/entries.d.ts +2 -0
- package/types/lodash/fp/entriesIn.d.ts +2 -0
- package/types/lodash/fp/eq.d.ts +2 -0
- package/types/lodash/fp/equals.d.ts +2 -0
- package/types/lodash/fp/escape.d.ts +2 -0
- package/types/lodash/fp/escapeRegExp.d.ts +2 -0
- package/types/lodash/fp/every.d.ts +2 -0
- package/types/lodash/fp/extend.d.ts +2 -0
- package/types/lodash/fp/extendAll.d.ts +2 -0
- package/types/lodash/fp/extendAllWith.d.ts +2 -0
- package/types/lodash/fp/extendWith.d.ts +2 -0
- package/types/lodash/fp/fill.d.ts +2 -0
- package/types/lodash/fp/filter.d.ts +2 -0
- package/types/lodash/fp/find.d.ts +2 -0
- package/types/lodash/fp/findFrom.d.ts +2 -0
- package/types/lodash/fp/findIndex.d.ts +2 -0
- package/types/lodash/fp/findIndexFrom.d.ts +2 -0
- package/types/lodash/fp/findKey.d.ts +2 -0
- package/types/lodash/fp/findLast.d.ts +2 -0
- package/types/lodash/fp/findLastFrom.d.ts +2 -0
- package/types/lodash/fp/findLastIndex.d.ts +2 -0
- package/types/lodash/fp/findLastIndexFrom.d.ts +2 -0
- package/types/lodash/fp/findLastKey.d.ts +2 -0
- package/types/lodash/fp/first.d.ts +2 -0
- package/types/lodash/fp/flatMap.d.ts +2 -0
- package/types/lodash/fp/flatMapDeep.d.ts +2 -0
- package/types/lodash/fp/flatMapDepth.d.ts +2 -0
- package/types/lodash/fp/flatten.d.ts +2 -0
- package/types/lodash/fp/flattenDeep.d.ts +2 -0
- package/types/lodash/fp/flattenDepth.d.ts +2 -0
- package/types/lodash/fp/flip.d.ts +2 -0
- package/types/lodash/fp/floor.d.ts +2 -0
- package/types/lodash/fp/flow.d.ts +2 -0
- package/types/lodash/fp/flowRight.d.ts +2 -0
- package/types/lodash/fp/forEach.d.ts +2 -0
- package/types/lodash/fp/forEachRight.d.ts +2 -0
- package/types/lodash/fp/forIn.d.ts +2 -0
- package/types/lodash/fp/forInRight.d.ts +2 -0
- package/types/lodash/fp/forOwn.d.ts +2 -0
- package/types/lodash/fp/forOwnRight.d.ts +2 -0
- package/types/lodash/fp/fromPairs.d.ts +2 -0
- package/types/lodash/fp/functions.d.ts +2 -0
- package/types/lodash/fp/functionsIn.d.ts +2 -0
- package/types/lodash/fp/get.d.ts +2 -0
- package/types/lodash/fp/getOr.d.ts +2 -0
- package/types/lodash/fp/groupBy.d.ts +2 -0
- package/types/lodash/fp/gt.d.ts +2 -0
- package/types/lodash/fp/gte.d.ts +2 -0
- package/types/lodash/fp/has.d.ts +2 -0
- package/types/lodash/fp/hasIn.d.ts +2 -0
- package/types/lodash/fp/head.d.ts +2 -0
- package/types/lodash/fp/identical.d.ts +2 -0
- package/types/lodash/fp/identity.d.ts +2 -0
- package/types/lodash/fp/inRange.d.ts +2 -0
- package/types/lodash/fp/includes.d.ts +2 -0
- package/types/lodash/fp/includesFrom.d.ts +2 -0
- package/types/lodash/fp/indexBy.d.ts +2 -0
- package/types/lodash/fp/indexOf.d.ts +2 -0
- package/types/lodash/fp/indexOfFrom.d.ts +2 -0
- package/types/lodash/fp/init.d.ts +2 -0
- package/types/lodash/fp/initial.d.ts +2 -0
- package/types/lodash/fp/intersection.d.ts +2 -0
- package/types/lodash/fp/intersectionBy.d.ts +2 -0
- package/types/lodash/fp/intersectionWith.d.ts +2 -0
- package/types/lodash/fp/invert.d.ts +2 -0
- package/types/lodash/fp/invertBy.d.ts +2 -0
- package/types/lodash/fp/invertObj.d.ts +2 -0
- package/types/lodash/fp/invoke.d.ts +2 -0
- package/types/lodash/fp/invokeArgs.d.ts +2 -0
- package/types/lodash/fp/invokeArgsMap.d.ts +2 -0
- package/types/lodash/fp/invokeMap.d.ts +2 -0
- package/types/lodash/fp/isArguments.d.ts +2 -0
- package/types/lodash/fp/isArray.d.ts +2 -0
- package/types/lodash/fp/isArrayBuffer.d.ts +2 -0
- package/types/lodash/fp/isArrayLike.d.ts +2 -0
- package/types/lodash/fp/isArrayLikeObject.d.ts +2 -0
- package/types/lodash/fp/isBoolean.d.ts +2 -0
- package/types/lodash/fp/isBuffer.d.ts +2 -0
- package/types/lodash/fp/isDate.d.ts +2 -0
- package/types/lodash/fp/isElement.d.ts +2 -0
- package/types/lodash/fp/isEmpty.d.ts +2 -0
- package/types/lodash/fp/isEqual.d.ts +2 -0
- package/types/lodash/fp/isEqualWith.d.ts +2 -0
- package/types/lodash/fp/isError.d.ts +2 -0
- package/types/lodash/fp/isFinite.d.ts +2 -0
- package/types/lodash/fp/isFunction.d.ts +2 -0
- package/types/lodash/fp/isInteger.d.ts +2 -0
- package/types/lodash/fp/isLength.d.ts +2 -0
- package/types/lodash/fp/isMap.d.ts +2 -0
- package/types/lodash/fp/isMatch.d.ts +2 -0
- package/types/lodash/fp/isMatchWith.d.ts +2 -0
- package/types/lodash/fp/isNaN.d.ts +2 -0
- package/types/lodash/fp/isNative.d.ts +2 -0
- package/types/lodash/fp/isNil.d.ts +2 -0
- package/types/lodash/fp/isNull.d.ts +2 -0
- package/types/lodash/fp/isNumber.d.ts +2 -0
- package/types/lodash/fp/isObject.d.ts +2 -0
- package/types/lodash/fp/isObjectLike.d.ts +2 -0
- package/types/lodash/fp/isPlainObject.d.ts +2 -0
- package/types/lodash/fp/isRegExp.d.ts +2 -0
- package/types/lodash/fp/isSafeInteger.d.ts +2 -0
- package/types/lodash/fp/isSet.d.ts +2 -0
- package/types/lodash/fp/isString.d.ts +2 -0
- package/types/lodash/fp/isSymbol.d.ts +2 -0
- package/types/lodash/fp/isTypedArray.d.ts +2 -0
- package/types/lodash/fp/isUndefined.d.ts +2 -0
- package/types/lodash/fp/isWeakMap.d.ts +2 -0
- package/types/lodash/fp/isWeakSet.d.ts +2 -0
- package/types/lodash/fp/iteratee.d.ts +2 -0
- package/types/lodash/fp/join.d.ts +2 -0
- package/types/lodash/fp/juxt.d.ts +2 -0
- package/types/lodash/fp/kebabCase.d.ts +2 -0
- package/types/lodash/fp/keyBy.d.ts +2 -0
- package/types/lodash/fp/keys.d.ts +2 -0
- package/types/lodash/fp/keysIn.d.ts +2 -0
- package/types/lodash/fp/last.d.ts +2 -0
- package/types/lodash/fp/lastIndexOf.d.ts +2 -0
- package/types/lodash/fp/lastIndexOfFrom.d.ts +2 -0
- package/types/lodash/fp/lowerCase.d.ts +2 -0
- package/types/lodash/fp/lowerFirst.d.ts +2 -0
- package/types/lodash/fp/lt.d.ts +2 -0
- package/types/lodash/fp/lte.d.ts +2 -0
- package/types/lodash/fp/map.d.ts +2 -0
- package/types/lodash/fp/mapKeys.d.ts +2 -0
- package/types/lodash/fp/mapValues.d.ts +2 -0
- package/types/lodash/fp/matches.d.ts +2 -0
- package/types/lodash/fp/matchesProperty.d.ts +2 -0
- package/types/lodash/fp/max.d.ts +2 -0
- package/types/lodash/fp/maxBy.d.ts +2 -0
- package/types/lodash/fp/mean.d.ts +2 -0
- package/types/lodash/fp/meanBy.d.ts +2 -0
- package/types/lodash/fp/memoize.d.ts +2 -0
- package/types/lodash/fp/merge.d.ts +2 -0
- package/types/lodash/fp/mergeAll.d.ts +2 -0
- package/types/lodash/fp/mergeAllWith.d.ts +2 -0
- package/types/lodash/fp/mergeWith.d.ts +2 -0
- package/types/lodash/fp/method.d.ts +2 -0
- package/types/lodash/fp/methodOf.d.ts +2 -0
- package/types/lodash/fp/min.d.ts +2 -0
- package/types/lodash/fp/minBy.d.ts +2 -0
- package/types/lodash/fp/multiply.d.ts +2 -0
- package/types/lodash/fp/nAry.d.ts +2 -0
- package/types/lodash/fp/negate.d.ts +2 -0
- package/types/lodash/fp/noConflict.d.ts +2 -0
- package/types/lodash/fp/noop.d.ts +2 -0
- package/types/lodash/fp/now.d.ts +2 -0
- package/types/lodash/fp/nth.d.ts +2 -0
- package/types/lodash/fp/nthArg.d.ts +2 -0
- package/types/lodash/fp/omit.d.ts +2 -0
- package/types/lodash/fp/omitAll.d.ts +2 -0
- package/types/lodash/fp/omitBy.d.ts +2 -0
- package/types/lodash/fp/once.d.ts +2 -0
- package/types/lodash/fp/orderBy.d.ts +2 -0
- package/types/lodash/fp/over.d.ts +2 -0
- package/types/lodash/fp/overArgs.d.ts +2 -0
- package/types/lodash/fp/overEvery.d.ts +2 -0
- package/types/lodash/fp/overSome.d.ts +2 -0
- package/types/lodash/fp/pad.d.ts +2 -0
- package/types/lodash/fp/padChars.d.ts +2 -0
- package/types/lodash/fp/padCharsEnd.d.ts +2 -0
- package/types/lodash/fp/padCharsStart.d.ts +2 -0
- package/types/lodash/fp/padEnd.d.ts +2 -0
- package/types/lodash/fp/padStart.d.ts +2 -0
- package/types/lodash/fp/parseInt.d.ts +2 -0
- package/types/lodash/fp/partial.d.ts +2 -0
- package/types/lodash/fp/partialRight.d.ts +2 -0
- package/types/lodash/fp/partition.d.ts +2 -0
- package/types/lodash/fp/path.d.ts +2 -0
- package/types/lodash/fp/pathEq.d.ts +2 -0
- package/types/lodash/fp/pathOr.d.ts +2 -0
- package/types/lodash/fp/paths.d.ts +2 -0
- package/types/lodash/fp/pick.d.ts +2 -0
- package/types/lodash/fp/pickAll.d.ts +2 -0
- package/types/lodash/fp/pickBy.d.ts +2 -0
- package/types/lodash/fp/pipe.d.ts +2 -0
- package/types/lodash/fp/placeholder.d.ts +3 -0
- package/types/lodash/fp/pluck.d.ts +2 -0
- package/types/lodash/fp/prop.d.ts +2 -0
- package/types/lodash/fp/propEq.d.ts +2 -0
- package/types/lodash/fp/propOr.d.ts +2 -0
- package/types/lodash/fp/property.d.ts +2 -0
- package/types/lodash/fp/propertyOf.d.ts +2 -0
- package/types/lodash/fp/props.d.ts +2 -0
- package/types/lodash/fp/pull.d.ts +2 -0
- package/types/lodash/fp/pullAll.d.ts +2 -0
- package/types/lodash/fp/pullAllBy.d.ts +2 -0
- package/types/lodash/fp/pullAllWith.d.ts +2 -0
- package/types/lodash/fp/pullAt.d.ts +2 -0
- package/types/lodash/fp/random.d.ts +2 -0
- package/types/lodash/fp/range.d.ts +2 -0
- package/types/lodash/fp/rangeRight.d.ts +2 -0
- package/types/lodash/fp/rangeStep.d.ts +2 -0
- package/types/lodash/fp/rangeStepRight.d.ts +2 -0
- package/types/lodash/fp/rearg.d.ts +2 -0
- package/types/lodash/fp/reduce.d.ts +2 -0
- package/types/lodash/fp/reduceRight.d.ts +2 -0
- package/types/lodash/fp/reject.d.ts +2 -0
- package/types/lodash/fp/remove.d.ts +2 -0
- package/types/lodash/fp/repeat.d.ts +2 -0
- package/types/lodash/fp/replace.d.ts +2 -0
- package/types/lodash/fp/rest.d.ts +2 -0
- package/types/lodash/fp/restFrom.d.ts +2 -0
- package/types/lodash/fp/result.d.ts +2 -0
- package/types/lodash/fp/reverse.d.ts +2 -0
- package/types/lodash/fp/round.d.ts +2 -0
- package/types/lodash/fp/runInContext.d.ts +2 -0
- package/types/lodash/fp/sample.d.ts +2 -0
- package/types/lodash/fp/sampleSize.d.ts +2 -0
- package/types/lodash/fp/set.d.ts +2 -0
- package/types/lodash/fp/setWith.d.ts +2 -0
- package/types/lodash/fp/shuffle.d.ts +2 -0
- package/types/lodash/fp/size.d.ts +2 -0
- package/types/lodash/fp/slice.d.ts +2 -0
- package/types/lodash/fp/snakeCase.d.ts +2 -0
- package/types/lodash/fp/some.d.ts +2 -0
- package/types/lodash/fp/sortBy.d.ts +2 -0
- package/types/lodash/fp/sortedIndex.d.ts +2 -0
- package/types/lodash/fp/sortedIndexBy.d.ts +2 -0
- package/types/lodash/fp/sortedIndexOf.d.ts +2 -0
- package/types/lodash/fp/sortedLastIndex.d.ts +2 -0
- package/types/lodash/fp/sortedLastIndexBy.d.ts +2 -0
- package/types/lodash/fp/sortedLastIndexOf.d.ts +2 -0
- package/types/lodash/fp/sortedUniq.d.ts +2 -0
- package/types/lodash/fp/sortedUniqBy.d.ts +2 -0
- package/types/lodash/fp/split.d.ts +2 -0
- package/types/lodash/fp/spread.d.ts +2 -0
- package/types/lodash/fp/spreadFrom.d.ts +2 -0
- package/types/lodash/fp/startCase.d.ts +2 -0
- package/types/lodash/fp/startsWith.d.ts +2 -0
- package/types/lodash/fp/stubArray.d.ts +2 -0
- package/types/lodash/fp/stubFalse.d.ts +2 -0
- package/types/lodash/fp/stubObject.d.ts +2 -0
- package/types/lodash/fp/stubString.d.ts +2 -0
- package/types/lodash/fp/stubTrue.d.ts +2 -0
- package/types/lodash/fp/subtract.d.ts +2 -0
- package/types/lodash/fp/sum.d.ts +2 -0
- package/types/lodash/fp/sumBy.d.ts +2 -0
- package/types/lodash/fp/symmetricDifference.d.ts +2 -0
- package/types/lodash/fp/symmetricDifferenceBy.d.ts +2 -0
- package/types/lodash/fp/symmetricDifferenceWith.d.ts +2 -0
- package/types/lodash/fp/tail.d.ts +2 -0
- package/types/lodash/fp/take.d.ts +2 -0
- package/types/lodash/fp/takeLast.d.ts +2 -0
- package/types/lodash/fp/takeLastWhile.d.ts +2 -0
- package/types/lodash/fp/takeRight.d.ts +2 -0
- package/types/lodash/fp/takeRightWhile.d.ts +2 -0
- package/types/lodash/fp/takeWhile.d.ts +2 -0
- package/types/lodash/fp/tap.d.ts +2 -0
- package/types/lodash/fp/template.d.ts +2 -0
- package/types/lodash/fp/throttle.d.ts +2 -0
- package/types/lodash/fp/thru.d.ts +2 -0
- package/types/lodash/fp/times.d.ts +2 -0
- package/types/lodash/fp/toArray.d.ts +2 -0
- package/types/lodash/fp/toFinite.d.ts +2 -0
- package/types/lodash/fp/toInteger.d.ts +2 -0
- package/types/lodash/fp/toLength.d.ts +2 -0
- package/types/lodash/fp/toLower.d.ts +2 -0
- package/types/lodash/fp/toNumber.d.ts +2 -0
- package/types/lodash/fp/toPairs.d.ts +2 -0
- package/types/lodash/fp/toPairsIn.d.ts +2 -0
- package/types/lodash/fp/toPath.d.ts +2 -0
- package/types/lodash/fp/toPlainObject.d.ts +2 -0
- package/types/lodash/fp/toSafeInteger.d.ts +2 -0
- package/types/lodash/fp/toString.d.ts +2 -0
- package/types/lodash/fp/toUpper.d.ts +2 -0
- package/types/lodash/fp/transform.d.ts +2 -0
- package/types/lodash/fp/trim.d.ts +2 -0
- package/types/lodash/fp/trimChars.d.ts +2 -0
- package/types/lodash/fp/trimCharsEnd.d.ts +2 -0
- package/types/lodash/fp/trimCharsStart.d.ts +2 -0
- package/types/lodash/fp/trimEnd.d.ts +2 -0
- package/types/lodash/fp/trimStart.d.ts +2 -0
- package/types/lodash/fp/truncate.d.ts +2 -0
- package/types/lodash/fp/unapply.d.ts +2 -0
- package/types/lodash/fp/unary.d.ts +2 -0
- package/types/lodash/fp/unescape.d.ts +2 -0
- package/types/lodash/fp/union.d.ts +2 -0
- package/types/lodash/fp/unionBy.d.ts +2 -0
- package/types/lodash/fp/unionWith.d.ts +2 -0
- package/types/lodash/fp/uniq.d.ts +2 -0
- package/types/lodash/fp/uniqBy.d.ts +2 -0
- package/types/lodash/fp/uniqWith.d.ts +2 -0
- package/types/lodash/fp/uniqueId.d.ts +2 -0
- package/types/lodash/fp/unnest.d.ts +2 -0
- package/types/lodash/fp/unset.d.ts +2 -0
- package/types/lodash/fp/unzip.d.ts +2 -0
- package/types/lodash/fp/unzipWith.d.ts +2 -0
- package/types/lodash/fp/update.d.ts +2 -0
- package/types/lodash/fp/updateWith.d.ts +2 -0
- package/types/lodash/fp/upperCase.d.ts +2 -0
- package/types/lodash/fp/upperFirst.d.ts +2 -0
- package/types/lodash/fp/useWith.d.ts +2 -0
- package/types/lodash/fp/values.d.ts +2 -0
- package/types/lodash/fp/valuesIn.d.ts +2 -0
- package/types/lodash/fp/where.d.ts +2 -0
- package/types/lodash/fp/whereEq.d.ts +2 -0
- package/types/lodash/fp/without.d.ts +2 -0
- package/types/lodash/fp/words.d.ts +2 -0
- package/types/lodash/fp/wrap.d.ts +2 -0
- package/types/lodash/fp/xor.d.ts +2 -0
- package/types/lodash/fp/xorBy.d.ts +2 -0
- package/types/lodash/fp/xorWith.d.ts +2 -0
- package/types/lodash/fp/zip.d.ts +2 -0
- package/types/lodash/fp/zipAll.d.ts +2 -0
- package/types/lodash/fp/zipObj.d.ts +2 -0
- package/types/lodash/fp/zipObject.d.ts +2 -0
- package/types/lodash/fp/zipObjectDeep.d.ts +2 -0
- package/types/lodash/fp/zipWith.d.ts +2 -0
- package/types/lodash/fp.d.ts +4766 -0
- package/types/lodash/fromPairs.d.ts +2 -0
- package/types/lodash/functions.d.ts +2 -0
- package/types/lodash/functionsIn.d.ts +2 -0
- package/types/lodash/get.d.ts +2 -0
- package/types/lodash/groupBy.d.ts +2 -0
- package/types/lodash/gt.d.ts +2 -0
- package/types/lodash/gte.d.ts +2 -0
- package/types/lodash/has.d.ts +2 -0
- package/types/lodash/hasIn.d.ts +2 -0
- package/types/lodash/head.d.ts +2 -0
- package/types/lodash/identity.d.ts +2 -0
- package/types/lodash/inRange.d.ts +2 -0
- package/types/lodash/includes.d.ts +2 -0
- package/types/lodash/index.d.ts +47 -0
- package/types/lodash/indexOf.d.ts +2 -0
- package/types/lodash/initial.d.ts +2 -0
- package/types/lodash/intersection.d.ts +2 -0
- package/types/lodash/intersectionBy.d.ts +2 -0
- package/types/lodash/intersectionWith.d.ts +2 -0
- package/types/lodash/invert.d.ts +2 -0
- package/types/lodash/invertBy.d.ts +2 -0
- package/types/lodash/invoke.d.ts +2 -0
- package/types/lodash/invokeMap.d.ts +2 -0
- package/types/lodash/isArguments.d.ts +2 -0
- package/types/lodash/isArray.d.ts +2 -0
- package/types/lodash/isArrayBuffer.d.ts +2 -0
- package/types/lodash/isArrayLike.d.ts +2 -0
- package/types/lodash/isArrayLikeObject.d.ts +2 -0
- package/types/lodash/isBoolean.d.ts +2 -0
- package/types/lodash/isBuffer.d.ts +2 -0
- package/types/lodash/isDate.d.ts +2 -0
- package/types/lodash/isElement.d.ts +2 -0
- package/types/lodash/isEmpty.d.ts +2 -0
- package/types/lodash/isEqual.d.ts +2 -0
- package/types/lodash/isEqualWith.d.ts +2 -0
- package/types/lodash/isError.d.ts +2 -0
- package/types/lodash/isFinite.d.ts +2 -0
- package/types/lodash/isFunction.d.ts +2 -0
- package/types/lodash/isInteger.d.ts +2 -0
- package/types/lodash/isLength.d.ts +2 -0
- package/types/lodash/isMap.d.ts +2 -0
- package/types/lodash/isMatch.d.ts +2 -0
- package/types/lodash/isMatchWith.d.ts +2 -0
- package/types/lodash/isNaN.d.ts +2 -0
- package/types/lodash/isNative.d.ts +2 -0
- package/types/lodash/isNil.d.ts +2 -0
- package/types/lodash/isNull.d.ts +2 -0
- package/types/lodash/isNumber.d.ts +2 -0
- package/types/lodash/isObject.d.ts +2 -0
- package/types/lodash/isObjectLike.d.ts +2 -0
- package/types/lodash/isPlainObject.d.ts +2 -0
- package/types/lodash/isRegExp.d.ts +2 -0
- package/types/lodash/isSafeInteger.d.ts +2 -0
- package/types/lodash/isSet.d.ts +2 -0
- package/types/lodash/isString.d.ts +2 -0
- package/types/lodash/isSymbol.d.ts +2 -0
- package/types/lodash/isTypedArray.d.ts +2 -0
- package/types/lodash/isUndefined.d.ts +2 -0
- package/types/lodash/isWeakMap.d.ts +2 -0
- package/types/lodash/isWeakSet.d.ts +2 -0
- package/types/lodash/iteratee.d.ts +2 -0
- package/types/lodash/join.d.ts +2 -0
- package/types/lodash/kebabCase.d.ts +2 -0
- package/types/lodash/keyBy.d.ts +2 -0
- package/types/lodash/keys.d.ts +2 -0
- package/types/lodash/keysIn.d.ts +2 -0
- package/types/lodash/last.d.ts +2 -0
- package/types/lodash/lastIndexOf.d.ts +2 -0
- package/types/lodash/lowerCase.d.ts +2 -0
- package/types/lodash/lowerFirst.d.ts +2 -0
- package/types/lodash/lt.d.ts +2 -0
- package/types/lodash/lte.d.ts +2 -0
- package/types/lodash/map.d.ts +2 -0
- package/types/lodash/mapKeys.d.ts +2 -0
- package/types/lodash/mapValues.d.ts +2 -0
- package/types/lodash/matches.d.ts +2 -0
- package/types/lodash/matchesProperty.d.ts +2 -0
- package/types/lodash/max.d.ts +2 -0
- package/types/lodash/maxBy.d.ts +2 -0
- package/types/lodash/mean.d.ts +2 -0
- package/types/lodash/meanBy.d.ts +2 -0
- package/types/lodash/memoize.d.ts +2 -0
- package/types/lodash/merge.d.ts +2 -0
- package/types/lodash/mergeWith.d.ts +2 -0
- package/types/lodash/method.d.ts +2 -0
- package/types/lodash/methodOf.d.ts +2 -0
- package/types/lodash/min.d.ts +2 -0
- package/types/lodash/minBy.d.ts +2 -0
- package/types/lodash/mixin.d.ts +2 -0
- package/types/lodash/negate.d.ts +2 -0
- package/types/lodash/noConflict.d.ts +2 -0
- package/types/lodash/noop.d.ts +2 -0
- package/types/lodash/now.d.ts +2 -0
- package/types/lodash/nth.d.ts +2 -0
- package/types/lodash/nthArg.d.ts +2 -0
- package/types/lodash/omit.d.ts +2 -0
- package/types/lodash/omitBy.d.ts +2 -0
- package/types/lodash/once.d.ts +2 -0
- package/types/lodash/orderBy.d.ts +2 -0
- package/types/lodash/over.d.ts +2 -0
- package/types/lodash/overArgs.d.ts +2 -0
- package/types/lodash/overEvery.d.ts +2 -0
- package/types/lodash/overSome.d.ts +2 -0
- package/types/lodash/pad.d.ts +2 -0
- package/types/lodash/padEnd.d.ts +2 -0
- package/types/lodash/padStart.d.ts +2 -0
- package/types/lodash/parseInt.d.ts +2 -0
- package/types/lodash/partial.d.ts +2 -0
- package/types/lodash/partialRight.d.ts +2 -0
- package/types/lodash/partition.d.ts +2 -0
- package/types/lodash/pick.d.ts +2 -0
- package/types/lodash/pickBy.d.ts +2 -0
- package/types/lodash/property.d.ts +2 -0
- package/types/lodash/propertyOf.d.ts +2 -0
- package/types/lodash/pull.d.ts +2 -0
- package/types/lodash/pullAll.d.ts +2 -0
- package/types/lodash/pullAllBy.d.ts +2 -0
- package/types/lodash/pullAllWith.d.ts +2 -0
- package/types/lodash/pullAt.d.ts +2 -0
- package/types/lodash/random.d.ts +2 -0
- package/types/lodash/range.d.ts +2 -0
- package/types/lodash/rangeRight.d.ts +2 -0
- package/types/lodash/rearg.d.ts +2 -0
- package/types/lodash/reduce.d.ts +2 -0
- package/types/lodash/reduceRight.d.ts +2 -0
- package/types/lodash/reject.d.ts +2 -0
- package/types/lodash/remove.d.ts +2 -0
- package/types/lodash/repeat.d.ts +2 -0
- package/types/lodash/replace.d.ts +2 -0
- package/types/lodash/rest.d.ts +2 -0
- package/types/lodash/result.d.ts +2 -0
- package/types/lodash/reverse.d.ts +2 -0
- package/types/lodash/round.d.ts +2 -0
- package/types/lodash/runInContext.d.ts +2 -0
- package/types/lodash/sample.d.ts +2 -0
- package/types/lodash/sampleSize.d.ts +2 -0
- package/types/lodash/set.d.ts +2 -0
- package/types/lodash/setWith.d.ts +2 -0
- package/types/lodash/shuffle.d.ts +2 -0
- package/types/lodash/size.d.ts +2 -0
- package/types/lodash/slice.d.ts +2 -0
- package/types/lodash/snakeCase.d.ts +2 -0
- package/types/lodash/some.d.ts +2 -0
- package/types/lodash/sortBy.d.ts +2 -0
- package/types/lodash/sortedIndex.d.ts +2 -0
- package/types/lodash/sortedIndexBy.d.ts +2 -0
- package/types/lodash/sortedIndexOf.d.ts +2 -0
- package/types/lodash/sortedLastIndex.d.ts +2 -0
- package/types/lodash/sortedLastIndexBy.d.ts +2 -0
- package/types/lodash/sortedLastIndexOf.d.ts +2 -0
- package/types/lodash/sortedUniq.d.ts +2 -0
- package/types/lodash/sortedUniqBy.d.ts +2 -0
- package/types/lodash/split.d.ts +2 -0
- package/types/lodash/spread.d.ts +2 -0
- package/types/lodash/startCase.d.ts +2 -0
- package/types/lodash/startsWith.d.ts +2 -0
- package/types/lodash/subtract.d.ts +2 -0
- package/types/lodash/sum.d.ts +2 -0
- package/types/lodash/sumBy.d.ts +2 -0
- package/types/lodash/tail.d.ts +2 -0
- package/types/lodash/take.d.ts +2 -0
- package/types/lodash/takeRight.d.ts +2 -0
- package/types/lodash/takeRightWhile.d.ts +2 -0
- package/types/lodash/takeWhile.d.ts +2 -0
- package/types/lodash/tap.d.ts +2 -0
- package/types/lodash/template.d.ts +2 -0
- package/types/lodash/throttle.d.ts +2 -0
- package/types/lodash/thru.d.ts +2 -0
- package/types/lodash/times.d.ts +2 -0
- package/types/lodash/toArray.d.ts +2 -0
- package/types/lodash/toFinite.d.ts +2 -0
- package/types/lodash/toInteger.d.ts +2 -0
- package/types/lodash/toLength.d.ts +2 -0
- package/types/lodash/toLower.d.ts +2 -0
- package/types/lodash/toNumber.d.ts +2 -0
- package/types/lodash/toPairs.d.ts +2 -0
- package/types/lodash/toPairsIn.d.ts +2 -0
- package/types/lodash/toPath.d.ts +2 -0
- package/types/lodash/toPlainObject.d.ts +2 -0
- package/types/lodash/toSafeInteger.d.ts +2 -0
- package/types/lodash/toString.d.ts +2 -0
- package/types/lodash/toUpper.d.ts +2 -0
- package/types/lodash/transform.d.ts +2 -0
- package/types/lodash/trim.d.ts +2 -0
- package/types/lodash/trimEnd.d.ts +2 -0
- package/types/lodash/trimStart.d.ts +2 -0
- package/types/lodash/truncate.d.ts +2 -0
- package/types/lodash/unary.d.ts +2 -0
- package/types/lodash/unescape.d.ts +2 -0
- package/types/lodash/union.d.ts +2 -0
- package/types/lodash/unionBy.d.ts +2 -0
- package/types/lodash/unionWith.d.ts +2 -0
- package/types/lodash/uniq.d.ts +2 -0
- package/types/lodash/uniqBy.d.ts +2 -0
- package/types/lodash/uniqWith.d.ts +2 -0
- package/types/lodash/uniqueId.d.ts +2 -0
- package/types/lodash/unset.d.ts +2 -0
- package/types/lodash/unzip.d.ts +2 -0
- package/types/lodash/unzipWith.d.ts +2 -0
- package/types/lodash/update.d.ts +2 -0
- package/types/lodash/updateWith.d.ts +2 -0
- package/types/lodash/upperCase.d.ts +2 -0
- package/types/lodash/upperFirst.d.ts +2 -0
- package/types/lodash/values.d.ts +2 -0
- package/types/lodash/valuesIn.d.ts +2 -0
- package/types/lodash/without.d.ts +2 -0
- package/types/lodash/words.d.ts +2 -0
- package/types/lodash/wrap.d.ts +2 -0
- package/types/lodash/xor.d.ts +2 -0
- package/types/lodash/xorBy.d.ts +2 -0
- package/types/lodash/xorWith.d.ts +2 -0
- package/types/lodash/zip.d.ts +2 -0
- package/types/lodash/zipObject.d.ts +2 -0
- package/types/lodash/zipObjectDeep.d.ts +2 -0
- package/types/lodash/zipWith.d.ts +2 -0
- package/types/minimatch/LICENSE +21 -0
- package/types/minimatch/README.md +16 -0
- package/types/minimatch/index.d.ts +214 -0
- package/types/mocha/LICENSE +21 -0
- package/types/mocha/README.md +16 -0
- package/types/mocha/index.d.ts +241 -0
- package/types/sinon/LICENSE +21 -0
- package/types/sinon/README.md +16 -0
- package/types/sinon/index.d.ts +1659 -0
- package/types/sinon/ts3.1/index.d.ts +1747 -0
- package/types/sinon-chai/LICENSE +21 -0
- package/types/sinon-chai/README.md +16 -0
- package/types/sinon-chai/index.d.ts +109 -0
- package/types/minimatch.d.ts +0 -11
- package/types/moment.d.ts +0 -11
package/lib/cli.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
var _templateObject = _taggedTemplateLiteral(['\n
|
3
|
+
var _templateObject = _taggedTemplateLiteral(['\n ', ' Warning: It looks like you\'re passing --spec a space-separated list of files:\n\n "', '"\n\n This will work, but it\'s not recommended.\n\n The most common cause of this warning is using an unescaped glob pattern. If you are\n trying to pass a glob pattern, escape it using quotes:\n cypress run --spec "**/*.spec.js"\n\n If you are trying to pass multiple spec filenames, separate them by commas instead:\n cypress run --spec spec1,spec2,spec3\n '], ['\n ', ' Warning: It looks like you\'re passing --spec a space-separated list of files:\n\n "', '"\n\n This will work, but it\'s not recommended.\n\n The most common cause of this warning is using an unescaped glob pattern. If you are\n trying to pass a glob pattern, escape it using quotes:\n cypress run --spec "**/*.spec.js"\n\n If you are trying to pass multiple spec filenames, separate them by commas instead:\n cypress run --spec spec1,spec2,spec3\n ']);
|
4
4
|
|
5
5
|
function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
6
6
|
|
@@ -8,8 +8,9 @@ var _ = require('lodash');
|
|
8
8
|
var commander = require('commander');
|
9
9
|
|
10
10
|
var _require = require('common-tags'),
|
11
|
-
|
11
|
+
stripIndent = _require.stripIndent;
|
12
12
|
|
13
|
+
var logSymbols = require('log-symbols');
|
13
14
|
var debug = require('debug')('cypress:cli');
|
14
15
|
var util = require('./util');
|
15
16
|
var logger = require('./logger');
|
@@ -26,8 +27,7 @@ function unknownOption(flag) {
|
|
26
27
|
logger.error(' error: unknown ' + type + ':', flag);
|
27
28
|
logger.error();
|
28
29
|
this.outputHelp();
|
29
|
-
|
30
|
-
process.exit(1);
|
30
|
+
util.exit(1);
|
31
31
|
}
|
32
32
|
commander.Command.prototype.unknownOption = unknownOption;
|
33
33
|
|
@@ -35,6 +35,37 @@ var coerceFalse = function coerceFalse(arg) {
|
|
35
35
|
return arg !== 'false';
|
36
36
|
};
|
37
37
|
|
38
|
+
var spaceDelimitedSpecsMsg = function spaceDelimitedSpecsMsg(files) {
|
39
|
+
logger.log();
|
40
|
+
logger.warn(stripIndent(_templateObject, logSymbols.warning, files.join(' ')));
|
41
|
+
logger.log();
|
42
|
+
};
|
43
|
+
|
44
|
+
var parseVariableOpts = function parseVariableOpts(fnArgs, args) {
|
45
|
+
var opts = fnArgs.pop();
|
46
|
+
|
47
|
+
if (fnArgs.length && opts.spec) {
|
48
|
+
// this will capture space-delimited specs after --spec spec1 but before the next option
|
49
|
+
|
50
|
+
var argIndex = _.indexOf(args, '--spec') + 2;
|
51
|
+
var nextOptOffset = _.findIndex(_.slice(args, argIndex), function (arg) {
|
52
|
+
return _.startsWith(arg, '--');
|
53
|
+
});
|
54
|
+
var endIndex = nextOptOffset !== -1 ? argIndex + nextOptOffset : args.length;
|
55
|
+
|
56
|
+
var maybeSpecs = _.slice(args, argIndex, endIndex);
|
57
|
+
var extraSpecs = _.intersection(maybeSpecs, fnArgs);
|
58
|
+
|
59
|
+
if (extraSpecs.length) {
|
60
|
+
opts.spec = [opts.spec].concat(extraSpecs);
|
61
|
+
spaceDelimitedSpecsMsg(opts.spec);
|
62
|
+
opts.spec = opts.spec.join(',');
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
return parseOpts(opts);
|
67
|
+
};
|
68
|
+
|
38
69
|
var parseOpts = function parseOpts(opts) {
|
39
70
|
opts = _.pick(opts, 'project', 'spec', 'reporter', 'reporterOptions', 'path', 'destination', 'port', 'env', 'cypressVersion', 'config', 'record', 'key', 'browser', 'detached', 'headed', 'global', 'dev', 'force', 'exit', 'cachePath', 'cacheList', 'cacheClear', 'parallel', 'group', 'ciBuildId');
|
40
71
|
|
@@ -56,7 +87,8 @@ var descriptions = {
|
|
56
87
|
port: 'runs Cypress on a specific port. overrides any value in cypress.json.',
|
57
88
|
env: 'sets environment variables. separate multiple values with a comma. overrides any value in cypress.json or cypress.env.json',
|
58
89
|
config: 'sets configuration values. separate multiple values with a comma. overrides any value in cypress.json.',
|
59
|
-
|
90
|
+
browserRunMode: 'runs Cypress in the browser with the given name. if a filesystem path is supplied, Cypress will attempt to use the browser at that path.',
|
91
|
+
browserOpenMode: 'path to a custom browser to be added to the list of available browsers in Cypress',
|
60
92
|
detached: 'runs Cypress application in detached mode',
|
61
93
|
project: 'path to the project',
|
62
94
|
global: 'force Cypress into global mode as if its globally installed',
|
@@ -65,9 +97,9 @@ var descriptions = {
|
|
65
97
|
dev: 'runs cypress in development and bypasses binary check',
|
66
98
|
forceInstall: 'force install the Cypress binary',
|
67
99
|
exit: 'keep the browser open after tests finish',
|
68
|
-
cachePath: 'print the
|
69
|
-
cacheList: 'list
|
70
|
-
cacheClear: 'delete
|
100
|
+
cachePath: 'print the path to the binary cache',
|
101
|
+
cacheList: 'list cached binary versions',
|
102
|
+
cacheClear: 'delete all cached binaries',
|
71
103
|
group: 'a named group for recorded runs in the Cypress dashboard',
|
72
104
|
parallel: 'enables concurrent runs and automatic load balancing of specs across multiple machines or processes',
|
73
105
|
ciBuildId: 'the unique identifier for a run on your CI provider. typically a "BUILD_ID" env var. this value is automatically detected for most CI providers'
|
@@ -117,12 +149,16 @@ module.exports = {
|
|
117
149
|
|
118
150
|
program.option('-v, --version', text('version')).command('version').description(text('version')).action(showVersions);
|
119
151
|
|
120
|
-
program.command('run').usage('[options]').description('Runs Cypress tests from the CLI without the GUI').option('--record [bool]', text('record'), coerceFalse).option('--headed', text('headed')).option('-k, --key <record-key>', text('key')).option('-s, --spec <spec>', text('spec')).option('-r, --reporter <reporter>', text('reporter')).option('-o, --reporter-options <reporter-options>', text('reporterOptions')).option('-p, --port <port>', text('port')).option('-e, --env <env>', text('env')).option('-c, --config <config>', text('config')).option('-b, --browser <browser-name>', text('
|
152
|
+
program.command('run').usage('[options]').description('Runs Cypress tests from the CLI without the GUI').option('--record [bool]', text('record'), coerceFalse).option('--headed', text('headed')).option('-k, --key <record-key>', text('key')).option('-s, --spec <spec>', text('spec')).option('-r, --reporter <reporter>', text('reporter')).option('-o, --reporter-options <reporter-options>', text('reporterOptions')).option('-p, --port <port>', text('port')).option('-e, --env <env>', text('env')).option('-c, --config <config>', text('config')).option('-b, --browser <browser-name-or-path>', text('browserRunMode')).option('-P, --project <project-path>', text('project')).option('--parallel', text('parallel')).option('--group <name>', text('group')).option('--ci-build-id <id>', text('ciBuildId')).option('--no-exit', text('exit')).option('--dev', text('dev'), coerceFalse).action(function () {
|
153
|
+
for (var _len = arguments.length, fnArgs = Array(_len), _key = 0; _key < _len; _key++) {
|
154
|
+
fnArgs[_key] = arguments[_key];
|
155
|
+
}
|
156
|
+
|
121
157
|
debug('running Cypress');
|
122
|
-
require('./exec/run').start(
|
158
|
+
require('./exec/run').start(parseVariableOpts(fnArgs, args)).then(util.exit).catch(util.logErrorExit1);
|
123
159
|
});
|
124
160
|
|
125
|
-
program.command('open').usage('[options]').description('Opens Cypress in the interactive GUI.').option('-p, --port <port>', text('port')).option('-e, --env <env>', text('env')).option('-c, --config <config>', text('config')).option('-d, --detached [bool]', text('detached'), coerceFalse).option('-P, --project <project
|
161
|
+
program.command('open').usage('[options]').description('Opens Cypress in the interactive GUI.').option('-p, --port <port>', text('port')).option('-e, --env <env>', text('env')).option('-c, --config <config>', text('config')).option('-d, --detached [bool]', text('detached'), coerceFalse).option('-b, --browser <browser-path>', text('browserOpenMode')).option('-P, --project <project-path>', text('project')).option('--global', text('global')).option('--dev', text('dev'), coerceFalse).action(function (opts) {
|
126
162
|
debug('opening Cypress');
|
127
163
|
require('./exec/open').start(parseOpts(opts)).catch(util.logErrorExit1);
|
128
164
|
});
|
@@ -131,7 +167,7 @@ module.exports = {
|
|
131
167
|
require('./tasks/install').start(parseOpts(opts)).catch(util.logErrorExit1);
|
132
168
|
});
|
133
169
|
|
134
|
-
program.command('verify').usage('[options]').description('Verifies that Cypress is installed correctly and executable').action(function (opts) {
|
170
|
+
program.command('verify').usage('[options]').description('Verifies that Cypress is installed correctly and executable').option('--dev', text('dev'), coerceFalse).action(function (opts) {
|
135
171
|
var defaultOpts = { force: true, welcomeMessage: false };
|
136
172
|
var parsedOpts = parseOpts(opts);
|
137
173
|
var options = _.extend(parsedOpts, defaultOpts);
|
@@ -140,8 +176,13 @@ module.exports = {
|
|
140
176
|
});
|
141
177
|
|
142
178
|
program.command('cache').usage('[command]').description('Manages the Cypress binary cache').option('list', text('cacheList')).option('path', text('cachePath')).option('clear', text('cacheClear')).action(function (opts) {
|
179
|
+
if (!_.isString(opts)) {
|
180
|
+
this.outputHelp();
|
181
|
+
util.exit(1);
|
182
|
+
}
|
183
|
+
|
143
184
|
if (opts.command || !_.includes(['list', 'path', 'clear'], opts)) {
|
144
|
-
unknownOption.call(this, 'cache ' + opts, '
|
185
|
+
unknownOption.call(this, 'cache ' + opts, 'command');
|
145
186
|
}
|
146
187
|
|
147
188
|
cache[opts]();
|
@@ -157,8 +198,6 @@ module.exports = {
|
|
157
198
|
// exits
|
158
199
|
}
|
159
200
|
|
160
|
-
// Deprecated Catches
|
161
|
-
|
162
201
|
var firstCommand = args[2];
|
163
202
|
|
164
203
|
if (!_.includes(knownCommands, firstCommand)) {
|
package/lib/errors.js
CHANGED
@@ -2,18 +2,20 @@
|
|
2
2
|
|
3
3
|
var _templateObject = _taggedTemplateLiteral(['\n Search for an existing issue or open a GitHub issue at\n\n ', '\n '], ['\n Search for an existing issue or open a GitHub issue at\n\n ', '\n ']),
|
4
4
|
_templateObject2 = _taggedTemplateLiteral(['\n \nPlease reinstall Cypress by running: ', '\n '], ['\n \\nPlease reinstall Cypress by running: ', '\n ']),
|
5
|
-
_templateObject3 = _taggedTemplateLiteral(['\n\n Reasons this may happen:\n
|
6
|
-
_templateObject4 = _taggedTemplateLiteral(['\n\n We expected the binary to be installed here: ', '\n
|
5
|
+
_templateObject3 = _taggedTemplateLiteral(['\n\n Reasons this may happen:\n\n - node was installed as \'root\' or with \'sudo\'\n - the cypress npm package as \'root\' or with \'sudo\'\n\n Please check that you have the appropriate user permissions.\n '], ['\\n\n Reasons this may happen:\n\n - node was installed as \'root\' or with \'sudo\'\n - the cypress npm package as \'root\' or with \'sudo\'\n\n Please check that you have the appropriate user permissions.\n ']),
|
6
|
+
_templateObject4 = _taggedTemplateLiteral(['\n\n We expected the binary to be installed here: ', '\n\n Reasons it may be missing:\n\n - You\'re caching \'node_modules\' but are not caching this path: ', '\n - You ran \'npm install\' at an earlier build step but did not persist: ', '\n\n Properly caching the binary will fix this error and avoid downloading and unzipping Cypress.\n\n Alternatively, you can run \'cypress install\' to download the binary again.\n\n ', '\n '], ['\\n\n We expected the binary to be installed here: ', '\n\n Reasons it may be missing:\n\n - You\'re caching \'node_modules\' but are not caching this path: ', '\n - You ran \'npm install\' at an earlier build step but did not persist: ', '\n\n Properly caching the binary will fix this error and avoid downloading and unzipping Cypress.\n\n Alternatively, you can run \'cypress install\' to download the binary again.\n\n ', '\n ']),
|
7
7
|
_templateObject5 = _taggedTemplateLiteral(['\n There was a problem spawning Xvfb.\n\n This is likely a problem with your system, permissions, or installation of Xvfb.\n '], ['\n There was a problem spawning Xvfb.\n\n This is likely a problem with your system, permissions, or installation of Xvfb.\n ']),
|
8
|
-
_templateObject6 = _taggedTemplateLiteral(['\n Install
|
9
|
-
_templateObject7 = _taggedTemplateLiteral(['\n This
|
10
|
-
_templateObject8 = _taggedTemplateLiteral(['\n
|
11
|
-
_templateObject9 = _taggedTemplateLiteral(['\n
|
12
|
-
_templateObject10 = _taggedTemplateLiteral(['\n
|
13
|
-
_templateObject11 = _taggedTemplateLiteral(['\n
|
14
|
-
_templateObject12 = _taggedTemplateLiteral(['\n
|
15
|
-
_templateObject13 = _taggedTemplateLiteral(['\n
|
16
|
-
_templateObject14 = _taggedTemplateLiteral(['', ''], ['', ''])
|
8
|
+
_templateObject6 = _taggedTemplateLiteral(['\n Install Xvfb and run Cypress again.\n\n Read our documentation on dependencies for more information:\n\n ', '\n\n If you are using Docker, we provide containers with all required dependencies installed.\n '], ['\n Install Xvfb and run Cypress again.\n\n Read our documentation on dependencies for more information:\n\n ', '\n\n If you are using Docker, we provide containers with all required dependencies installed.\n ']),
|
9
|
+
_templateObject7 = _taggedTemplateLiteral(['\n This command failed with the following output:\n\n ', '\n\n '], ['\n This command failed with the following output:\n\n ', '\n\n ']),
|
10
|
+
_templateObject8 = _taggedTemplateLiteral(['\n Cypress failed to start after spawning a new Xvfb server.\n\n The error logs we received were:\n\n ', '\n\n ', '\n\n ', '\n\n This is usually caused by a missing library or dependency.\n\n The error above should indicate which dependency is missing.\n\n ', '\n\n If you are using Docker, we provide containers with all required dependencies installed.\n '], ['\n Cypress failed to start after spawning a new Xvfb server.\n\n The error logs we received were:\n\n ', '\n\n ', '\n\n ', '\n\n This is usually caused by a missing library or dependency.\n\n The error above should indicate which dependency is missing.\n\n ', '\n\n If you are using Docker, we provide containers with all required dependencies installed.\n ']),
|
11
|
+
_templateObject9 = _taggedTemplateLiteral(['\n This is usually caused by a missing library or dependency.\n\n The error below should indicate which dependency is missing.\n\n ', '\n\n If you are using Docker, we provide containers with all required dependencies installed.\n '], ['\n This is usually caused by a missing library or dependency.\n\n The error below should indicate which dependency is missing.\n\n ', '\n\n If you are using Docker, we provide containers with all required dependencies installed.\n ']),
|
12
|
+
_templateObject10 = _taggedTemplateLiteral(['\n See discussion and possible solutions at\n ', '\n '], ['\n See discussion and possible solutions at\n ', '\n ']),
|
13
|
+
_templateObject11 = _taggedTemplateLiteral(['\n Please search Cypress documentation for possible solutions:\n\n ', '\n\n Check if there is a GitHub issue describing this crash:\n\n ', '\n\n Consider opening a new issue.\n '], ['\n Please search Cypress documentation for possible solutions:\n\n ', '\n\n Check if there is a GitHub issue describing this crash:\n\n ', '\n\n Consider opening a new issue.\n ']),
|
14
|
+
_templateObject12 = _taggedTemplateLiteral(['\n The environment variable CYPRESS_BINARY_VERSION has been renamed to CYPRESS_INSTALL_BINARY as of version ', '\n '], ['\n The environment variable CYPRESS_BINARY_VERSION has been renamed to CYPRESS_INSTALL_BINARY as of version ', '\n ']),
|
15
|
+
_templateObject13 = _taggedTemplateLiteral(['\n You should set CYPRESS_INSTALL_BINARY instead.\n '], ['\n You should set CYPRESS_INSTALL_BINARY instead.\n ']),
|
16
|
+
_templateObject14 = _taggedTemplateLiteral(['\n The environment variable CYPRESS_SKIP_BINARY_INSTALL has been removed as of version ', '\n '], ['\n The environment variable CYPRESS_SKIP_BINARY_INSTALL has been removed as of version ', '\n ']),
|
17
|
+
_templateObject15 = _taggedTemplateLiteral(['\n To skip the binary install, set CYPRESS_INSTALL_BINARY=0\n '], ['\n To skip the binary install, set CYPRESS_INSTALL_BINARY=0\n ']),
|
18
|
+
_templateObject16 = _taggedTemplateLiteral(['\n Platform: ', ' (', ')\n Cypress Version: ', '\n '], ['\n Platform: ', ' (', ')\n Cypress Version: ', '\n ']);
|
17
19
|
|
18
20
|
function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
19
21
|
|
@@ -27,13 +29,20 @@ var _require = require('common-tags'),
|
|
27
29
|
var _require2 = require('ramda'),
|
28
30
|
merge = _require2.merge;
|
29
31
|
|
32
|
+
var la = require('lazy-ass');
|
33
|
+
var is = require('check-more-types');
|
34
|
+
|
30
35
|
var util = require('./util');
|
31
36
|
var state = require('./tasks/state');
|
32
37
|
|
33
|
-
var issuesUrl = 'https://github.com/cypress-io/cypress/issues';
|
34
38
|
var docsUrl = 'https://on.cypress.io';
|
35
39
|
var requiredDependenciesUrl = docsUrl + '/required-dependencies';
|
36
40
|
|
41
|
+
// TODO it would be nice if all error objects could be enforced via types
|
42
|
+
// to only have description + solution properties
|
43
|
+
|
44
|
+
var hr = '----------';
|
45
|
+
|
37
46
|
// common errors Cypress application can encounter
|
38
47
|
var failedDownload = {
|
39
48
|
description: 'The Cypress App could not be downloaded.',
|
@@ -42,7 +51,7 @@ var failedDownload = {
|
|
42
51
|
|
43
52
|
var failedUnzip = {
|
44
53
|
description: 'The Cypress App could not be unzipped.',
|
45
|
-
solution: stripIndent(_templateObject, chalk.blue(issuesUrl))
|
54
|
+
solution: stripIndent(_templateObject, chalk.blue(util.issuesUrl))
|
46
55
|
};
|
47
56
|
|
48
57
|
var missingApp = function missingApp(binaryDir) {
|
@@ -54,7 +63,7 @@ var missingApp = function missingApp(binaryDir) {
|
|
54
63
|
|
55
64
|
var binaryNotExecutable = function binaryNotExecutable(executable) {
|
56
65
|
return {
|
57
|
-
description: 'Cypress cannot run because
|
66
|
+
description: 'Cypress cannot run because this binary file does not have executable permissions here:\n\n' + executable,
|
58
67
|
solution: stripIndent(_templateObject3)
|
59
68
|
};
|
60
69
|
};
|
@@ -67,24 +76,39 @@ var notInstalledCI = function notInstalledCI(executable) {
|
|
67
76
|
};
|
68
77
|
|
69
78
|
var nonZeroExitCodeXvfb = {
|
70
|
-
description: '
|
79
|
+
description: 'Xvfb exited with a non zero exit code.',
|
71
80
|
solution: stripIndent(_templateObject5)
|
72
81
|
};
|
73
82
|
|
74
83
|
var missingXvfb = {
|
75
|
-
description: 'Your system is missing the dependency:
|
84
|
+
description: 'Your system is missing the dependency: Xvfb',
|
76
85
|
solution: stripIndent(_templateObject6, chalk.blue(requiredDependenciesUrl))
|
77
86
|
};
|
78
87
|
|
88
|
+
var smokeTestFailure = function smokeTestFailure(smokeTestCommand, timedOut) {
|
89
|
+
return {
|
90
|
+
description: 'Cypress verification ' + (timedOut ? 'timed out' : 'failed') + '.',
|
91
|
+
solution: stripIndent(_templateObject7, smokeTestCommand)
|
92
|
+
};
|
93
|
+
};
|
94
|
+
|
95
|
+
var invalidSmokeTestDisplayError = {
|
96
|
+
code: 'INVALID_SMOKE_TEST_DISPLAY_ERROR',
|
97
|
+
description: 'Cypress verification failed.',
|
98
|
+
solution: function solution(msg) {
|
99
|
+
return stripIndent(_templateObject8, hr, msg, hr, chalk.blue(requiredDependenciesUrl));
|
100
|
+
}
|
101
|
+
};
|
102
|
+
|
79
103
|
var missingDependency = {
|
80
104
|
description: 'Cypress failed to start.',
|
81
105
|
// this message is too Linux specific
|
82
|
-
solution: stripIndent(
|
106
|
+
solution: stripIndent(_templateObject9, chalk.blue(requiredDependenciesUrl))
|
83
107
|
};
|
84
108
|
|
85
109
|
var invalidCacheDirectory = {
|
86
110
|
description: 'Cypress cannot write to the cache directory due to file permissions',
|
87
|
-
solution:
|
111
|
+
solution: stripIndent(_templateObject10, chalk.blue(util.getGitHubIssueUrl(1281)))
|
88
112
|
};
|
89
113
|
|
90
114
|
var versionMismatch = {
|
@@ -94,17 +118,17 @@ var versionMismatch = {
|
|
94
118
|
|
95
119
|
var unexpected = {
|
96
120
|
description: 'An unexpected error occurred while verifying the Cypress executable.',
|
97
|
-
solution: stripIndent(
|
121
|
+
solution: stripIndent(_templateObject11, chalk.blue(docsUrl), chalk.blue(util.issuesUrl))
|
98
122
|
};
|
99
123
|
|
100
124
|
var removed = {
|
101
125
|
CYPRESS_BINARY_VERSION: {
|
102
|
-
description: stripIndent(
|
103
|
-
solution: stripIndent(
|
126
|
+
description: stripIndent(_templateObject12, chalk.green('3.0.0')),
|
127
|
+
solution: stripIndent(_templateObject13)
|
104
128
|
},
|
105
129
|
CYPRESS_SKIP_BINARY_INSTALL: {
|
106
|
-
description: stripIndent(
|
107
|
-
solution: stripIndent(
|
130
|
+
description: stripIndent(_templateObject14, chalk.green('3.0.0')),
|
131
|
+
solution: stripIndent(_templateObject15)
|
108
132
|
}
|
109
133
|
};
|
110
134
|
|
@@ -113,7 +137,7 @@ var CYPRESS_RUN_BINARY = {
|
|
113
137
|
var properFormat = '**/' + state.getPlatformExecutable();
|
114
138
|
|
115
139
|
return {
|
116
|
-
description: 'Could not run binary set by environment variable CYPRESS_RUN_BINARY=' + value,
|
140
|
+
description: 'Could not run binary set by environment variable: CYPRESS_RUN_BINARY=' + value,
|
117
141
|
solution: 'Ensure the environment variable is a path to the Cypress binary, matching ' + properFormat
|
118
142
|
};
|
119
143
|
}
|
@@ -121,7 +145,7 @@ var CYPRESS_RUN_BINARY = {
|
|
121
145
|
|
122
146
|
function getPlatformInfo() {
|
123
147
|
return util.getOsVersionAsync().then(function (version) {
|
124
|
-
return stripIndent(
|
148
|
+
return stripIndent(_templateObject16, os.platform(), version, util.pkgVersion());
|
125
149
|
});
|
126
150
|
}
|
127
151
|
|
@@ -131,20 +155,36 @@ function addPlatformInformation(info) {
|
|
131
155
|
});
|
132
156
|
}
|
133
157
|
|
134
|
-
|
135
|
-
|
136
|
-
|
158
|
+
/**
|
159
|
+
* Forms nice error message with error and platform information,
|
160
|
+
* and if possible a way to solve it. Resolves with a string.
|
161
|
+
*/
|
162
|
+
function formErrorText(info, msg, prevMessage) {
|
137
163
|
return addPlatformInformation(info).then(function (obj) {
|
138
164
|
var formatted = [];
|
139
165
|
|
140
166
|
function add(msg) {
|
141
|
-
formatted.push(stripIndents(
|
167
|
+
formatted.push(stripIndents(msg));
|
142
168
|
}
|
143
169
|
|
144
|
-
|
170
|
+
la(is.unemptyString(obj.description), 'expected error description to be text', obj.description);
|
171
|
+
|
172
|
+
// assuming that if there the solution is a function it will handle
|
173
|
+
// error message and (optional previous error message)
|
174
|
+
if (is.fn(obj.solution)) {
|
175
|
+
var text = obj.solution(msg, prevMessage);
|
176
|
+
|
177
|
+
la(is.unemptyString(text), 'expected solution to be text', text);
|
178
|
+
|
179
|
+
add('\n ' + obj.description + '\n\n ' + text + '\n\n ');
|
180
|
+
} else {
|
181
|
+
la(is.unemptyString(obj.solution), 'expected error solution to be text', obj.solution);
|
145
182
|
|
146
|
-
|
147
|
-
|
183
|
+
add('\n ' + obj.description + '\n\n ' + obj.solution + '\n\n ');
|
184
|
+
|
185
|
+
if (msg) {
|
186
|
+
add('\n ' + hr + '\n\n ' + msg + '\n\n ');
|
187
|
+
}
|
148
188
|
}
|
149
189
|
|
150
190
|
add('\n ' + hr + '\n\n ' + obj.platform + '\n ');
|
@@ -153,34 +193,41 @@ function formErrorText(info, msg) {
|
|
153
193
|
add('\n\n ' + hr + '\n\n ' + obj.footer + '\n ');
|
154
194
|
}
|
155
195
|
|
156
|
-
return formatted.join('\n');
|
196
|
+
return formatted.join('\n\n');
|
157
197
|
});
|
158
198
|
}
|
159
199
|
|
160
|
-
var raise = function raise(
|
161
|
-
|
200
|
+
var raise = function raise(info) {
|
201
|
+
return function (text) {
|
202
|
+
var err = new Error(text);
|
203
|
+
|
204
|
+
if (info.code) {
|
205
|
+
err.code = info.code;
|
206
|
+
}
|
162
207
|
|
163
|
-
|
164
|
-
|
208
|
+
err.known = true;
|
209
|
+
throw err;
|
210
|
+
};
|
165
211
|
};
|
166
212
|
|
167
213
|
var throwFormErrorText = function throwFormErrorText(info) {
|
168
|
-
return function (msg) {
|
169
|
-
return formErrorText(info, msg).then(raise);
|
214
|
+
return function (msg, prevMessage) {
|
215
|
+
return formErrorText(info, msg, prevMessage).then(raise(info));
|
170
216
|
};
|
171
217
|
};
|
172
218
|
|
173
219
|
module.exports = {
|
174
220
|
raise: raise,
|
175
|
-
// formError,
|
176
221
|
formErrorText: formErrorText,
|
177
222
|
throwFormErrorText: throwFormErrorText,
|
223
|
+
hr: hr,
|
178
224
|
errors: {
|
179
225
|
nonZeroExitCodeXvfb: nonZeroExitCodeXvfb,
|
180
226
|
missingXvfb: missingXvfb,
|
181
227
|
missingApp: missingApp,
|
182
228
|
notInstalledCI: notInstalledCI,
|
183
229
|
missingDependency: missingDependency,
|
230
|
+
invalidSmokeTestDisplayError: invalidSmokeTestDisplayError,
|
184
231
|
versionMismatch: versionMismatch,
|
185
232
|
binaryNotExecutable: binaryNotExecutable,
|
186
233
|
unexpected: unexpected,
|
@@ -188,6 +235,7 @@ module.exports = {
|
|
188
235
|
failedUnzip: failedUnzip,
|
189
236
|
invalidCacheDirectory: invalidCacheDirectory,
|
190
237
|
removed: removed,
|
191
|
-
CYPRESS_RUN_BINARY: CYPRESS_RUN_BINARY
|
238
|
+
CYPRESS_RUN_BINARY: CYPRESS_RUN_BINARY,
|
239
|
+
smokeTestFailure: smokeTestFailure
|
192
240
|
}
|
193
241
|
};
|
package/lib/exec/open.js
CHANGED
package/lib/exec/spawn.js
CHANGED
@@ -6,6 +6,7 @@ var cp = require('child_process');
|
|
6
6
|
var path = require('path');
|
7
7
|
var Promise = require('bluebird');
|
8
8
|
var debug = require('debug')('cypress:cli');
|
9
|
+
var debugElectron = require('debug')('cypress:electron');
|
9
10
|
|
10
11
|
var util = require('../util');
|
11
12
|
var state = require('../tasks/state');
|
@@ -18,12 +19,20 @@ var _require = require('../errors'),
|
|
18
19
|
var isXlibOrLibudevRe = /^(?:Xlib|libudev)/;
|
19
20
|
var isHighSierraWarningRe = /\*\*\* WARNING/;
|
20
21
|
|
22
|
+
var GARBAGE_WARNINGS = [isXlibOrLibudevRe, isHighSierraWarningRe];
|
23
|
+
|
24
|
+
var isGarbageLineWarning = function isGarbageLineWarning(str) {
|
25
|
+
return _.some(GARBAGE_WARNINGS, function (re) {
|
26
|
+
return re.test(str);
|
27
|
+
});
|
28
|
+
};
|
29
|
+
|
21
30
|
function isPlatform(platform) {
|
22
31
|
return os.platform() === platform;
|
23
32
|
}
|
24
33
|
|
25
34
|
function needsStderrPiped(needsXvfb) {
|
26
|
-
return isPlatform('darwin')
|
35
|
+
return _.some([isPlatform('darwin'), needsXvfb && isPlatform('linux'), util.isPossibleLinuxWithIncorrectDisplay()]);
|
27
36
|
}
|
28
37
|
|
29
38
|
function needsEverythingPipedDirectly() {
|
@@ -41,7 +50,7 @@ function getStdio(needsXvfb) {
|
|
41
50
|
if (needsStderrPiped(needsXvfb)) {
|
42
51
|
// returning pipe here so we can massage stderr
|
43
52
|
// and remove garbage from Xlib and libuv
|
44
|
-
// due to starting the
|
53
|
+
// due to starting the Xvfb process on linux
|
45
54
|
return ['inherit', 'inherit', 'pipe'];
|
46
55
|
}
|
47
56
|
|
@@ -59,19 +68,27 @@ module.exports = {
|
|
59
68
|
executable = path.resolve(util.getEnv('CYPRESS_RUN_BINARY'));
|
60
69
|
}
|
61
70
|
|
62
|
-
debug('needs
|
71
|
+
debug('needs to start own Xvfb?', needsXvfb);
|
63
72
|
|
64
73
|
// always push cwd into the args
|
65
74
|
args = [].concat(args, '--cwd', process.cwd());
|
66
75
|
|
67
76
|
_.defaults(options, {
|
77
|
+
dev: false,
|
68
78
|
env: process.env,
|
69
79
|
detached: false,
|
70
80
|
stdio: getStdio(needsXvfb)
|
71
81
|
});
|
72
82
|
|
73
83
|
var spawn = function spawn() {
|
84
|
+
var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
85
|
+
|
74
86
|
return new Promise(function (resolve, reject) {
|
87
|
+
_.defaults(overrides, {
|
88
|
+
onStderrData: false,
|
89
|
+
electronLogging: false
|
90
|
+
});
|
91
|
+
|
75
92
|
if (options.dev) {
|
76
93
|
// if we're in dev then reset
|
77
94
|
// the launch cmd to be 'npm run dev'
|
@@ -79,26 +96,39 @@ module.exports = {
|
|
79
96
|
args.unshift(path.resolve(__dirname, '..', '..', '..', 'scripts', 'start.js'));
|
80
97
|
}
|
81
98
|
|
82
|
-
var
|
83
|
-
|
99
|
+
var onStderrData = overrides.onStderrData,
|
100
|
+
electronLogging = overrides.electronLogging;
|
84
101
|
|
85
|
-
|
86
|
-
|
87
|
-
|
102
|
+
var envOverrides = util.getEnvOverrides();
|
103
|
+
var electronArgs = _.clone(args);
|
104
|
+
var node11WindowsFix = isPlatform('win32');
|
88
105
|
|
89
106
|
// strip dev out of child process options
|
90
|
-
|
91
|
-
options = _.omit(options, 'binaryFolder');
|
107
|
+
var stdioOptions = _.pick(options, 'env', 'detached', 'stdio');
|
92
108
|
|
93
109
|
// figure out if we're going to be force enabling or disabling colors.
|
94
110
|
// also figure out whether we should force stdout and stderr into thinking
|
95
111
|
// it is a tty as opposed to a pipe.
|
96
|
-
|
112
|
+
stdioOptions.env = _.extend({}, stdioOptions.env, envOverrides);
|
113
|
+
|
97
114
|
if (node11WindowsFix) {
|
98
|
-
|
115
|
+
stdioOptions = _.extend({}, stdioOptions, { windowsHide: false });
|
116
|
+
}
|
117
|
+
|
118
|
+
if (electronLogging) {
|
119
|
+
stdioOptions.env.ELECTRON_ENABLE_LOGGING = true;
|
99
120
|
}
|
100
121
|
|
101
|
-
|
122
|
+
if (util.isPossibleLinuxWithIncorrectDisplay()) {
|
123
|
+
// make sure we use the latest DISPLAY variable if any
|
124
|
+
debug('passing DISPLAY', process.env.DISPLAY);
|
125
|
+
stdioOptions.env.DISPLAY = process.env.DISPLAY;
|
126
|
+
}
|
127
|
+
|
128
|
+
debug('spawning Cypress with executable: %s', executable);
|
129
|
+
debug('spawn args %o %o', electronArgs, _.omit(stdioOptions, 'env'));
|
130
|
+
|
131
|
+
var child = cp.spawn(executable, electronArgs, stdioOptions);
|
102
132
|
|
103
133
|
child.on('close', resolve);
|
104
134
|
child.on('error', reject);
|
@@ -112,7 +142,13 @@ module.exports = {
|
|
112
142
|
var str = data.toString();
|
113
143
|
|
114
144
|
// bail if this is warning line garbage
|
115
|
-
if (
|
145
|
+
if (isGarbageLineWarning(str)) {
|
146
|
+
return;
|
147
|
+
}
|
148
|
+
|
149
|
+
// if we have a callback and this explictly returns
|
150
|
+
// false then bail
|
151
|
+
if (onStderrData && onStderrData(str) === false) {
|
116
152
|
return;
|
117
153
|
}
|
118
154
|
|
@@ -134,20 +170,63 @@ module.exports = {
|
|
134
170
|
throw err;
|
135
171
|
});
|
136
172
|
|
137
|
-
if (
|
173
|
+
if (stdioOptions.detached) {
|
138
174
|
child.unref();
|
139
175
|
}
|
140
176
|
});
|
141
177
|
};
|
142
178
|
|
143
|
-
var
|
144
|
-
return
|
179
|
+
var spawnInXvfb = function spawnInXvfb() {
|
180
|
+
return xvfb.start().then(userFriendlySpawn).finally(xvfb.stop);
|
181
|
+
};
|
182
|
+
|
183
|
+
var userFriendlySpawn = function userFriendlySpawn(linuxWithDisplayEnv) {
|
184
|
+
debug('spawning, should retry on display problem?', Boolean(linuxWithDisplayEnv));
|
185
|
+
|
186
|
+
var brokenGtkDisplay = void 0;
|
187
|
+
|
188
|
+
var overrides = {};
|
189
|
+
|
190
|
+
if (linuxWithDisplayEnv) {
|
191
|
+
_.extend(overrides, {
|
192
|
+
electronLogging: true,
|
193
|
+
onStderrData: function onStderrData(str) {
|
194
|
+
// if we receive a broken pipe anywhere
|
195
|
+
// then we know that's why cypress exited early
|
196
|
+
if (util.isBrokenGtkDisplay(str)) {
|
197
|
+
brokenGtkDisplay = true;
|
198
|
+
}
|
199
|
+
|
200
|
+
// we should attempt to always slurp up
|
201
|
+
// the stderr logs unless we've explicitly
|
202
|
+
// enabled the electron debug logging
|
203
|
+
if (!debugElectron.enabled) {
|
204
|
+
return false;
|
205
|
+
}
|
206
|
+
}
|
207
|
+
});
|
208
|
+
}
|
209
|
+
|
210
|
+
return spawn(overrides).then(function (code) {
|
211
|
+
if (code !== 0 && brokenGtkDisplay) {
|
212
|
+
util.logBrokenGtkDisplayWarning();
|
213
|
+
|
214
|
+
return spawnInXvfb();
|
215
|
+
}
|
216
|
+
|
217
|
+
return code;
|
218
|
+
}).catch(throwFormErrorText(errors.unexpected));
|
145
219
|
};
|
146
220
|
|
147
221
|
if (needsXvfb) {
|
148
|
-
return
|
222
|
+
return spawnInXvfb();
|
149
223
|
}
|
150
224
|
|
151
|
-
|
225
|
+
// if we are on linux and there's already a DISPLAY
|
226
|
+
// set, then we may need to rerun cypress after
|
227
|
+
// spawning our own Xvfb server
|
228
|
+
var linuxWithDisplayEnv = util.isPossibleLinuxWithIncorrectDisplay();
|
229
|
+
|
230
|
+
return userFriendlySpawn(linuxWithDisplayEnv);
|
152
231
|
}
|
153
232
|
};
|