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
@@ -0,0 +1,1624 @@
|
|
1
|
+
// Type definitions for chai 4.0
|
2
|
+
// Project: http://chaijs.com/
|
3
|
+
// Definitions by: Jed Mao <https://github.com/jedmao>,
|
4
|
+
// Bart van der Schoor <https://github.com/Bartvds>,
|
5
|
+
// Andrew Brown <https://github.com/AGBrown>,
|
6
|
+
// Olivier Chevet <https://github.com/olivr70>,
|
7
|
+
// Matt Wistrand <https://github.com/mwistrand>,
|
8
|
+
// Josh Goldberg <https://github.com/joshuakgoldberg>
|
9
|
+
// Shaun Luttin <https://github.com/shaunluttin>
|
10
|
+
// Gintautas Miselis <https://github.com/Naktibalda>
|
11
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
12
|
+
|
13
|
+
// <reference types="assertion-error"/>
|
14
|
+
|
15
|
+
declare namespace Chai {
|
16
|
+
interface ChaiStatic {
|
17
|
+
expect: ExpectStatic;
|
18
|
+
should(): Should;
|
19
|
+
/**
|
20
|
+
* Provides a way to extend the internals of Chai
|
21
|
+
*/
|
22
|
+
use(fn: (chai: any, utils: any) => void): ChaiStatic;
|
23
|
+
assert: AssertStatic;
|
24
|
+
config: Config;
|
25
|
+
AssertionError: typeof AssertionError;
|
26
|
+
version: string;
|
27
|
+
}
|
28
|
+
|
29
|
+
export interface ExpectStatic extends AssertionStatic {
|
30
|
+
fail(actual?: any, expected?: any, message?: string, operator?: Operator): void;
|
31
|
+
}
|
32
|
+
|
33
|
+
export interface AssertStatic extends Assert {
|
34
|
+
}
|
35
|
+
|
36
|
+
export interface AssertionStatic {
|
37
|
+
(target: any, message?: string): Assertion;
|
38
|
+
}
|
39
|
+
|
40
|
+
export type Operator = string; // "==" | "===" | ">" | ">=" | "<" | "<=" | "!=" | "!==";
|
41
|
+
|
42
|
+
export type OperatorComparable = boolean | null | number | string | undefined | Date;
|
43
|
+
|
44
|
+
interface ShouldAssertion {
|
45
|
+
equal(value1: any, value2: any, message?: string): void;
|
46
|
+
Throw: ShouldThrow;
|
47
|
+
throw: ShouldThrow;
|
48
|
+
exist(value: any, message?: string): void;
|
49
|
+
}
|
50
|
+
|
51
|
+
interface Should extends ShouldAssertion {
|
52
|
+
not: ShouldAssertion;
|
53
|
+
fail(actual: any, expected: any, message?: string, operator?: Operator): void;
|
54
|
+
}
|
55
|
+
|
56
|
+
interface ShouldThrow {
|
57
|
+
(actual: Function, expected?: string|RegExp, message?: string): void;
|
58
|
+
(actual: Function, constructor: Error|Function, expected?: string|RegExp, message?: string): void;
|
59
|
+
}
|
60
|
+
|
61
|
+
interface Assertion extends LanguageChains, NumericComparison, TypeComparison {
|
62
|
+
not: Assertion;
|
63
|
+
deep: Deep;
|
64
|
+
ordered: Ordered;
|
65
|
+
nested: Nested;
|
66
|
+
any: KeyFilter;
|
67
|
+
all: KeyFilter;
|
68
|
+
a: TypeComparison;
|
69
|
+
an: TypeComparison;
|
70
|
+
include: Include;
|
71
|
+
includes: Include;
|
72
|
+
contain: Include;
|
73
|
+
contains: Include;
|
74
|
+
ok: Assertion;
|
75
|
+
true: Assertion;
|
76
|
+
false: Assertion;
|
77
|
+
null: Assertion;
|
78
|
+
undefined: Assertion;
|
79
|
+
NaN: Assertion;
|
80
|
+
exist: Assertion;
|
81
|
+
empty: Assertion;
|
82
|
+
arguments: Assertion;
|
83
|
+
Arguments: Assertion;
|
84
|
+
equal: Equal;
|
85
|
+
equals: Equal;
|
86
|
+
eq: Equal;
|
87
|
+
eql: Equal;
|
88
|
+
eqls: Equal;
|
89
|
+
property: Property;
|
90
|
+
ownProperty: OwnProperty;
|
91
|
+
haveOwnProperty: OwnProperty;
|
92
|
+
ownPropertyDescriptor: OwnPropertyDescriptor;
|
93
|
+
haveOwnPropertyDescriptor: OwnPropertyDescriptor;
|
94
|
+
length: Length;
|
95
|
+
lengthOf: Length;
|
96
|
+
match: Match;
|
97
|
+
matches: Match;
|
98
|
+
string(string: string, message?: string): Assertion;
|
99
|
+
keys: Keys;
|
100
|
+
key(string: string): Assertion;
|
101
|
+
throw: Throw;
|
102
|
+
throws: Throw;
|
103
|
+
Throw: Throw;
|
104
|
+
respondTo: RespondTo;
|
105
|
+
respondsTo: RespondTo;
|
106
|
+
itself: Assertion;
|
107
|
+
satisfy: Satisfy;
|
108
|
+
satisfies: Satisfy;
|
109
|
+
closeTo: CloseTo;
|
110
|
+
approximately: CloseTo;
|
111
|
+
members: Members;
|
112
|
+
increase: PropertyChange;
|
113
|
+
increases: PropertyChange;
|
114
|
+
decrease: PropertyChange;
|
115
|
+
decreases: PropertyChange;
|
116
|
+
change: PropertyChange;
|
117
|
+
changes: PropertyChange;
|
118
|
+
extensible: Assertion;
|
119
|
+
sealed: Assertion;
|
120
|
+
frozen: Assertion;
|
121
|
+
oneOf(list: any[], message?: string): Assertion;
|
122
|
+
}
|
123
|
+
|
124
|
+
interface LanguageChains {
|
125
|
+
to: Assertion;
|
126
|
+
be: Assertion;
|
127
|
+
been: Assertion;
|
128
|
+
is: Assertion;
|
129
|
+
that: Assertion;
|
130
|
+
which: Assertion;
|
131
|
+
and: Assertion;
|
132
|
+
has: Assertion;
|
133
|
+
have: Assertion;
|
134
|
+
with: Assertion;
|
135
|
+
at: Assertion;
|
136
|
+
of: Assertion;
|
137
|
+
same: Assertion;
|
138
|
+
but: Assertion;
|
139
|
+
does: Assertion;
|
140
|
+
}
|
141
|
+
|
142
|
+
interface NumericComparison {
|
143
|
+
above: NumberComparer;
|
144
|
+
gt: NumberComparer;
|
145
|
+
greaterThan: NumberComparer;
|
146
|
+
least: NumberComparer;
|
147
|
+
gte: NumberComparer;
|
148
|
+
below: NumberComparer;
|
149
|
+
lt: NumberComparer;
|
150
|
+
lessThan: NumberComparer;
|
151
|
+
most: NumberComparer;
|
152
|
+
lte: NumberComparer;
|
153
|
+
within(start: number, finish: number, message?: string): Assertion;
|
154
|
+
}
|
155
|
+
|
156
|
+
interface NumberComparer {
|
157
|
+
(value: number, message?: string): Assertion;
|
158
|
+
}
|
159
|
+
|
160
|
+
interface TypeComparison {
|
161
|
+
(type: string, message?: string): Assertion;
|
162
|
+
instanceof: InstanceOf;
|
163
|
+
instanceOf: InstanceOf;
|
164
|
+
}
|
165
|
+
|
166
|
+
interface InstanceOf {
|
167
|
+
(constructor: Object, message?: string): Assertion;
|
168
|
+
}
|
169
|
+
|
170
|
+
interface CloseTo {
|
171
|
+
(expected: number, delta: number, message?: string): Assertion;
|
172
|
+
}
|
173
|
+
|
174
|
+
interface Nested {
|
175
|
+
include: Include;
|
176
|
+
property: Property;
|
177
|
+
members: Members;
|
178
|
+
}
|
179
|
+
|
180
|
+
interface Deep {
|
181
|
+
equal: Equal;
|
182
|
+
equals: Equal;
|
183
|
+
eq: Equal;
|
184
|
+
include: Include;
|
185
|
+
property: Property;
|
186
|
+
members: Members;
|
187
|
+
ordered: Ordered;
|
188
|
+
}
|
189
|
+
|
190
|
+
interface Ordered {
|
191
|
+
members: Members;
|
192
|
+
}
|
193
|
+
|
194
|
+
interface KeyFilter {
|
195
|
+
keys: Keys;
|
196
|
+
}
|
197
|
+
|
198
|
+
interface Equal {
|
199
|
+
(value: any, message?: string): Assertion;
|
200
|
+
}
|
201
|
+
|
202
|
+
interface Property {
|
203
|
+
(name: string, value?: any, message?: string): Assertion;
|
204
|
+
}
|
205
|
+
|
206
|
+
interface OwnProperty {
|
207
|
+
(name: string, message?: string): Assertion;
|
208
|
+
}
|
209
|
+
|
210
|
+
interface OwnPropertyDescriptor {
|
211
|
+
(name: string, descriptor: PropertyDescriptor, message?: string): Assertion;
|
212
|
+
(name: string, message?: string): Assertion;
|
213
|
+
}
|
214
|
+
|
215
|
+
interface Length extends LanguageChains, NumericComparison {
|
216
|
+
(length: number, message?: string): Assertion;
|
217
|
+
}
|
218
|
+
|
219
|
+
interface Include {
|
220
|
+
(value: Object | string | number, message?: string): Assertion;
|
221
|
+
keys: Keys;
|
222
|
+
deep: Deep;
|
223
|
+
ordered: Ordered;
|
224
|
+
members: Members;
|
225
|
+
any: KeyFilter;
|
226
|
+
all: KeyFilter;
|
227
|
+
}
|
228
|
+
|
229
|
+
interface Match {
|
230
|
+
(regexp: RegExp|string, message?: string): Assertion;
|
231
|
+
}
|
232
|
+
|
233
|
+
interface Keys {
|
234
|
+
(...keys: string[]): Assertion;
|
235
|
+
(keys: any[]|Object): Assertion;
|
236
|
+
}
|
237
|
+
|
238
|
+
interface Throw {
|
239
|
+
(expected?: string|RegExp, message?: string): Assertion;
|
240
|
+
(constructor: Error|Function, expected?: string|RegExp, message?: string): Assertion;
|
241
|
+
}
|
242
|
+
|
243
|
+
interface RespondTo {
|
244
|
+
(method: string, message?: string): Assertion;
|
245
|
+
}
|
246
|
+
|
247
|
+
interface Satisfy {
|
248
|
+
(matcher: Function, message?: string): Assertion;
|
249
|
+
}
|
250
|
+
|
251
|
+
interface Members {
|
252
|
+
(set: any[], message?: string): Assertion;
|
253
|
+
}
|
254
|
+
|
255
|
+
interface PropertyChange {
|
256
|
+
(object: Object, property: string, message?: string): Assertion;
|
257
|
+
}
|
258
|
+
|
259
|
+
export interface Assert {
|
260
|
+
/**
|
261
|
+
* @param expression Expression to test for truthiness.
|
262
|
+
* @param message Message to display on error.
|
263
|
+
*/
|
264
|
+
(expression: any, message?: string): void;
|
265
|
+
|
266
|
+
/**
|
267
|
+
* Throws a failure.
|
268
|
+
*
|
269
|
+
* @type T Type of the objects.
|
270
|
+
* @param actual Actual value.
|
271
|
+
* @param expected Potential expected value.
|
272
|
+
* @param message Message to display on error.
|
273
|
+
* @param operator Comparison operator, if not strict equality.
|
274
|
+
* @remarks Node.js assert module-compatible.
|
275
|
+
*/
|
276
|
+
fail<T>(actual?: T, expected?: T, message?: string, operator?: Operator): void;
|
277
|
+
|
278
|
+
/**
|
279
|
+
* Asserts that object is truthy.
|
280
|
+
*
|
281
|
+
* @type T Type of object.
|
282
|
+
* @param object Object to test.
|
283
|
+
* @param message Message to display on error.
|
284
|
+
*/
|
285
|
+
isOk<T>(value: T, message?: string): void;
|
286
|
+
|
287
|
+
/**
|
288
|
+
* Asserts that object is truthy.
|
289
|
+
*
|
290
|
+
* @type T Type of object.
|
291
|
+
* @param object Object to test.
|
292
|
+
* @param message Message to display on error.
|
293
|
+
*/
|
294
|
+
ok<T>(value: T, message?: string): void;
|
295
|
+
|
296
|
+
/**
|
297
|
+
* Asserts that object is falsy.
|
298
|
+
*
|
299
|
+
* @type T Type of object.
|
300
|
+
* @param object Object to test.
|
301
|
+
* @param message Message to display on error.
|
302
|
+
*/
|
303
|
+
isNotOk<T>(value: T, message?: string): void;
|
304
|
+
|
305
|
+
/**
|
306
|
+
* Asserts that object is falsy.
|
307
|
+
*
|
308
|
+
* @type T Type of object.
|
309
|
+
* @param object Object to test.
|
310
|
+
* @param message Message to display on error.
|
311
|
+
*/
|
312
|
+
notOk<T>(value: T, message?: string): void;
|
313
|
+
|
314
|
+
/**
|
315
|
+
* Asserts non-strict equality (==) of actual and expected.
|
316
|
+
*
|
317
|
+
* @type T Type of the objects.
|
318
|
+
* @param actual Actual value.
|
319
|
+
* @param expected Potential expected value.
|
320
|
+
* @param message Message to display on error.
|
321
|
+
*/
|
322
|
+
equal<T>(actual: T, expected: T, message?: string): void;
|
323
|
+
|
324
|
+
/**
|
325
|
+
* Asserts non-strict inequality (==) of actual and expected.
|
326
|
+
*
|
327
|
+
* @type T Type of the objects.
|
328
|
+
* @param actual Actual value.
|
329
|
+
* @param expected Potential expected value.
|
330
|
+
* @param message Message to display on error.
|
331
|
+
*/
|
332
|
+
notEqual<T>(actual: T, expected: T, message?: string): void;
|
333
|
+
|
334
|
+
/**
|
335
|
+
* Asserts strict equality (===) of actual and expected.
|
336
|
+
*
|
337
|
+
* @type T Type of the objects.
|
338
|
+
* @param actual Actual value.
|
339
|
+
* @param expected Potential expected value.
|
340
|
+
* @param message Message to display on error.
|
341
|
+
*/
|
342
|
+
strictEqual<T>(actual: T, expected: T, message?: string): void;
|
343
|
+
|
344
|
+
/**
|
345
|
+
* Asserts strict inequality (==) of actual and expected.
|
346
|
+
*
|
347
|
+
* @type T Type of the objects.
|
348
|
+
* @param actual Actual value.
|
349
|
+
* @param expected Potential expected value.
|
350
|
+
* @param message Message to display on error.
|
351
|
+
*/
|
352
|
+
notStrictEqual<T>(actual: T, expected: T, message?: string): void;
|
353
|
+
|
354
|
+
/**
|
355
|
+
* Asserts that actual is deeply equal to expected.
|
356
|
+
*
|
357
|
+
* @type T Type of the objects.
|
358
|
+
* @param actual Actual value.
|
359
|
+
* @param expected Potential expected value.
|
360
|
+
* @param message Message to display on error.
|
361
|
+
*/
|
362
|
+
deepEqual<T>(actual: T, expected: T, message?: string): void;
|
363
|
+
|
364
|
+
/**
|
365
|
+
* Asserts that actual is not deeply equal to expected.
|
366
|
+
*
|
367
|
+
* @type T Type of the objects.
|
368
|
+
* @param actual Actual value.
|
369
|
+
* @param expected Potential expected value.
|
370
|
+
* @param message Message to display on error.
|
371
|
+
*/
|
372
|
+
notDeepEqual<T>(actual: T, expected: T, message?: string): void;
|
373
|
+
|
374
|
+
/**
|
375
|
+
* Asserts valueToCheck is strictly greater than (>) valueToBeAbove.
|
376
|
+
*
|
377
|
+
* @param valueToCheck Actual value.
|
378
|
+
* @param valueToBeAbove Minimum Potential expected value.
|
379
|
+
* @param message Message to display on error.
|
380
|
+
*/
|
381
|
+
isAbove(valueToCheck: number, valueToBeAbove: number, message?: string): void;
|
382
|
+
|
383
|
+
/**
|
384
|
+
* Asserts valueToCheck is greater than or equal to (>=) valueToBeAtLeast.
|
385
|
+
*
|
386
|
+
* @param valueToCheck Actual value.
|
387
|
+
* @param valueToBeAtLeast Minimum Potential expected value.
|
388
|
+
* @param message Message to display on error.
|
389
|
+
*/
|
390
|
+
isAtLeast(valueToCheck: number, valueToBeAtLeast: number, message?: string): void;
|
391
|
+
|
392
|
+
/**
|
393
|
+
* Asserts valueToCheck is strictly less than (<) valueToBeBelow.
|
394
|
+
*
|
395
|
+
* @param valueToCheck Actual value.
|
396
|
+
* @param valueToBeBelow Minimum Potential expected value.
|
397
|
+
* @param message Message to display on error.
|
398
|
+
*/
|
399
|
+
isBelow(valueToCheck: number, valueToBeBelow: number, message?: string): void;
|
400
|
+
|
401
|
+
/**
|
402
|
+
* Asserts valueToCheck is greater than or equal to (>=) valueToBeAtMost.
|
403
|
+
*
|
404
|
+
* @param valueToCheck Actual value.
|
405
|
+
* @param valueToBeAtMost Minimum Potential expected value.
|
406
|
+
* @param message Message to display on error.
|
407
|
+
*/
|
408
|
+
isAtMost(valueToCheck: number, valueToBeAtMost: number, message?: string): void;
|
409
|
+
|
410
|
+
/**
|
411
|
+
* Asserts that value is true.
|
412
|
+
*
|
413
|
+
* @type T Type of value.
|
414
|
+
* @param value Actual value.
|
415
|
+
* @param message Message to display on error.
|
416
|
+
*/
|
417
|
+
isTrue<T>(value: T, message?: string): void;
|
418
|
+
|
419
|
+
/**
|
420
|
+
* Asserts that value is false.
|
421
|
+
*
|
422
|
+
* @type T Type of value.
|
423
|
+
* @param value Actual value.
|
424
|
+
* @param message Message to display on error.
|
425
|
+
*/
|
426
|
+
isFalse<T>(value: T, message?: string): void;
|
427
|
+
|
428
|
+
/**
|
429
|
+
* Asserts that value is not true.
|
430
|
+
*
|
431
|
+
* @type T Type of value.
|
432
|
+
* @param value Actual value.
|
433
|
+
* @param message Message to display on error.
|
434
|
+
*/
|
435
|
+
isNotTrue<T>(value: T, message?: string): void;
|
436
|
+
|
437
|
+
/**
|
438
|
+
* Asserts that value is not false.
|
439
|
+
*
|
440
|
+
* @type T Type of value.
|
441
|
+
* @param value Actual value.
|
442
|
+
* @param message Message to display on error.
|
443
|
+
*/
|
444
|
+
isNotFalse<T>(value: T, message?: string): void;
|
445
|
+
|
446
|
+
/**
|
447
|
+
* Asserts that value is null.
|
448
|
+
*
|
449
|
+
* @type T Type of value.
|
450
|
+
* @param value Actual value.
|
451
|
+
* @param message Message to display on error.
|
452
|
+
*/
|
453
|
+
isNull<T>(value: T, message?: string): void;
|
454
|
+
|
455
|
+
/**
|
456
|
+
* Asserts that value is not null.
|
457
|
+
*
|
458
|
+
* @type T Type of value.
|
459
|
+
* @param value Actual value.
|
460
|
+
* @param message Message to display on error.
|
461
|
+
*/
|
462
|
+
isNotNull<T>(value: T, message?: string): void;
|
463
|
+
|
464
|
+
/**
|
465
|
+
* Asserts that value is not null.
|
466
|
+
*
|
467
|
+
* @type T Type of value.
|
468
|
+
* @param value Actual value.
|
469
|
+
* @param message Message to display on error.
|
470
|
+
*/
|
471
|
+
isNaN<T>(value: T, message?: string): void;
|
472
|
+
|
473
|
+
/**
|
474
|
+
* Asserts that value is not null.
|
475
|
+
*
|
476
|
+
* @type T Type of value.
|
477
|
+
* @param value Actual value.
|
478
|
+
* @param message Message to display on error.
|
479
|
+
*/
|
480
|
+
isNotNaN<T>(value: T, message?: string): void;
|
481
|
+
|
482
|
+
/**
|
483
|
+
* Asserts that the target is neither null nor undefined.
|
484
|
+
*
|
485
|
+
* @type T Type of value.
|
486
|
+
* @param value Actual value.
|
487
|
+
* @param message Message to display on error.
|
488
|
+
*/
|
489
|
+
exists<T>(value: T, message?: string): void;
|
490
|
+
|
491
|
+
/**
|
492
|
+
* Asserts that the target is either null or undefined.
|
493
|
+
*
|
494
|
+
* @type T Type of value.
|
495
|
+
* @param value Actual value.
|
496
|
+
* @param message Message to display on error.
|
497
|
+
*/
|
498
|
+
notExists<T>(value: T, message?: string): void;
|
499
|
+
|
500
|
+
/**
|
501
|
+
* Asserts that value is undefined.
|
502
|
+
*
|
503
|
+
* @type T Type of value.
|
504
|
+
* @param value Actual value.
|
505
|
+
* @param message Message to display on error.
|
506
|
+
*/
|
507
|
+
isUndefined<T>(value: T, message?: string): void;
|
508
|
+
|
509
|
+
/**
|
510
|
+
* Asserts that value is not undefined.
|
511
|
+
*
|
512
|
+
* @type T Type of value.
|
513
|
+
* @param value Actual value.
|
514
|
+
* @param message Message to display on error.
|
515
|
+
*/
|
516
|
+
isDefined<T>(value: T, message?: string): void;
|
517
|
+
|
518
|
+
/**
|
519
|
+
* Asserts that value is a function.
|
520
|
+
*
|
521
|
+
* @type T Type of value.
|
522
|
+
* @param value Actual value.
|
523
|
+
* @param message Message to display on error.
|
524
|
+
*/
|
525
|
+
isFunction<T>(value: T, message?: string): void;
|
526
|
+
|
527
|
+
/**
|
528
|
+
* Asserts that value is not a function.
|
529
|
+
*
|
530
|
+
* @type T Type of value.
|
531
|
+
* @param value Actual value.
|
532
|
+
* @param message Message to display on error.
|
533
|
+
*/
|
534
|
+
isNotFunction<T>(value: T, message?: string): void;
|
535
|
+
|
536
|
+
/**
|
537
|
+
* Asserts that value is an object of type 'Object'
|
538
|
+
* (as revealed by Object.prototype.toString).
|
539
|
+
*
|
540
|
+
* @type T Type of value.
|
541
|
+
* @param value Actual value.
|
542
|
+
* @param message Message to display on error.
|
543
|
+
* @remarks The assertion does not match subclassed objects.
|
544
|
+
*/
|
545
|
+
isObject<T>(value: T, message?: string): void;
|
546
|
+
|
547
|
+
/**
|
548
|
+
* Asserts that value is not an object of type 'Object'
|
549
|
+
* (as revealed by Object.prototype.toString).
|
550
|
+
*
|
551
|
+
* @type T Type of value.
|
552
|
+
* @param value Actual value.
|
553
|
+
* @param message Message to display on error.
|
554
|
+
*/
|
555
|
+
isNotObject<T>(value: T, message?: string): void;
|
556
|
+
|
557
|
+
/**
|
558
|
+
* Asserts that value is an array.
|
559
|
+
*
|
560
|
+
* @type T Type of value.
|
561
|
+
* @param value Actual value.
|
562
|
+
* @param message Message to display on error.
|
563
|
+
*/
|
564
|
+
isArray<T>(value: T, message?: string): void;
|
565
|
+
|
566
|
+
/**
|
567
|
+
* Asserts that value is not an array.
|
568
|
+
*
|
569
|
+
* @type T Type of value.
|
570
|
+
* @param value Actual value.
|
571
|
+
* @param message Message to display on error.
|
572
|
+
*/
|
573
|
+
isNotArray<T>(value: T, message?: string): void;
|
574
|
+
|
575
|
+
/**
|
576
|
+
* Asserts that value is a string.
|
577
|
+
*
|
578
|
+
* @type T Type of value.
|
579
|
+
* @param value Actual value.
|
580
|
+
* @param message Message to display on error.
|
581
|
+
*/
|
582
|
+
isString<T>(value: T, message?: string): void;
|
583
|
+
|
584
|
+
/**
|
585
|
+
* Asserts that value is not a string.
|
586
|
+
*
|
587
|
+
* @type T Type of value.
|
588
|
+
* @param value Actual value.
|
589
|
+
* @param message Message to display on error.
|
590
|
+
*/
|
591
|
+
isNotString<T>(value: T, message?: string): void;
|
592
|
+
|
593
|
+
/**
|
594
|
+
* Asserts that value is a number.
|
595
|
+
*
|
596
|
+
* @type T Type of value.
|
597
|
+
* @param value Actual value.
|
598
|
+
* @param message Message to display on error.
|
599
|
+
*/
|
600
|
+
isNumber<T>(value: T, message?: string): void;
|
601
|
+
|
602
|
+
/**
|
603
|
+
* Asserts that value is not a number.
|
604
|
+
*
|
605
|
+
* @type T Type of value.
|
606
|
+
* @param value Actual value.
|
607
|
+
* @param message Message to display on error.
|
608
|
+
*/
|
609
|
+
isNotNumber<T>(value: T, message?: string): void;
|
610
|
+
|
611
|
+
/**
|
612
|
+
* Asserts that value is a boolean.
|
613
|
+
*
|
614
|
+
* @type T Type of value.
|
615
|
+
* @param value Actual value.
|
616
|
+
* @param message Message to display on error.
|
617
|
+
*/
|
618
|
+
isBoolean<T>(value: T, message?: string): void;
|
619
|
+
|
620
|
+
/**
|
621
|
+
* Asserts that value is not a boolean.
|
622
|
+
*
|
623
|
+
* @type T Type of value.
|
624
|
+
* @param value Actual value.
|
625
|
+
* @param message Message to display on error.
|
626
|
+
*/
|
627
|
+
isNotBoolean<T>(value: T, message?: string): void;
|
628
|
+
|
629
|
+
/**
|
630
|
+
* Asserts that value's type is name, as determined by Object.prototype.toString.
|
631
|
+
*
|
632
|
+
* @type T Type of value.
|
633
|
+
* @param value Actual value.
|
634
|
+
* @param name Potential expected type name of value.
|
635
|
+
* @param message Message to display on error.
|
636
|
+
*/
|
637
|
+
typeOf<T>(value: T, name: string, message?: string): void;
|
638
|
+
|
639
|
+
/**
|
640
|
+
* Asserts that value's type is not name, as determined by Object.prototype.toString.
|
641
|
+
*
|
642
|
+
* @type T Type of value.
|
643
|
+
* @param value Actual value.
|
644
|
+
* @param name Potential expected type name of value.
|
645
|
+
* @param message Message to display on error.
|
646
|
+
*/
|
647
|
+
notTypeOf<T>(value: T, name: string, message?: string): void;
|
648
|
+
|
649
|
+
/**
|
650
|
+
* Asserts that value is an instance of constructor.
|
651
|
+
*
|
652
|
+
* @type T Type of value.
|
653
|
+
* @param value Actual value.
|
654
|
+
* @param constructor Potential expected contructor of value.
|
655
|
+
* @param message Message to display on error.
|
656
|
+
*/
|
657
|
+
instanceOf<T>(value: T, constructor: Function, message?: string): void;
|
658
|
+
|
659
|
+
/**
|
660
|
+
* Asserts that value is not an instance of constructor.
|
661
|
+
*
|
662
|
+
* @type T Type of value.
|
663
|
+
* @param value Actual value.
|
664
|
+
* @param constructor Potential expected contructor of value.
|
665
|
+
* @param message Message to display on error.
|
666
|
+
*/
|
667
|
+
notInstanceOf<T>(value: T, type: Function, message?: string): void;
|
668
|
+
|
669
|
+
/**
|
670
|
+
* Asserts that haystack includes needle.
|
671
|
+
*
|
672
|
+
* @param haystack Container string.
|
673
|
+
* @param needle Potential expected substring of haystack.
|
674
|
+
* @param message Message to display on error.
|
675
|
+
*/
|
676
|
+
include(haystack: string, needle: string, message?: string): void;
|
677
|
+
|
678
|
+
/**
|
679
|
+
* Asserts that haystack includes needle.
|
680
|
+
*
|
681
|
+
* @type T Type of values in haystack.
|
682
|
+
* @param haystack Container array.
|
683
|
+
* @param needle Potential value contained in haystack.
|
684
|
+
* @param message Message to display on error.
|
685
|
+
*/
|
686
|
+
include<T>(haystack: T[], needle: T, message?: string): void;
|
687
|
+
|
688
|
+
/**
|
689
|
+
* Asserts that haystack does not include needle.
|
690
|
+
*
|
691
|
+
* @param haystack Container string or array.
|
692
|
+
* @param needle Potential expected substring of haystack.
|
693
|
+
* @param message Message to display on error.
|
694
|
+
*/
|
695
|
+
notInclude(haystack: string | any[], needle: any, message?: string): void;
|
696
|
+
|
697
|
+
/**
|
698
|
+
* Asserts that haystack includes needle. Can be used to assert the inclusion of a value in an array or a subset of properties in an object. Deep equality is used.
|
699
|
+
*
|
700
|
+
* @param haystack Container string.
|
701
|
+
* @param needle Potential expected substring of haystack.
|
702
|
+
* @param message Message to display on error.
|
703
|
+
*/
|
704
|
+
deepInclude(haystack: string, needle: string, message?: string): void;
|
705
|
+
|
706
|
+
/**
|
707
|
+
* Asserts that haystack includes needle. Can be used to assert the inclusion of a value in an array or a subset of properties in an object. Deep equality is used.
|
708
|
+
*
|
709
|
+
* @param haystack
|
710
|
+
* @param needle
|
711
|
+
* @param message Message to display on error.
|
712
|
+
*/
|
713
|
+
deepInclude<T>(haystack: any, needle: any, message?: string): void;
|
714
|
+
|
715
|
+
/**
|
716
|
+
* Asserts that haystack does not include needle. Can be used to assert the absence of a value in an array or a subset of properties in an object. Deep equality is used.
|
717
|
+
*
|
718
|
+
* @param haystack Container string or array.
|
719
|
+
* @param needle Potential expected substring of haystack.
|
720
|
+
* @param message Message to display on error.
|
721
|
+
*/
|
722
|
+
notDeepInclude(haystack: string | any[], needle: any, message?: string): void;
|
723
|
+
|
724
|
+
/**
|
725
|
+
* Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object.
|
726
|
+
*
|
727
|
+
* Enables the use of dot- and bracket-notation for referencing nested properties.
|
728
|
+
* ‘[]’ and ‘.’ in property names can be escaped using double backslashes.Asserts that ‘haystack’ includes ‘needle’.
|
729
|
+
* Can be used to assert the inclusion of a subset of properties in an object.
|
730
|
+
* Enables the use of dot- and bracket-notation for referencing nested properties.
|
731
|
+
* ‘[]’ and ‘.’ in property names can be escaped using double backslashes.
|
732
|
+
*
|
733
|
+
* @param haystack
|
734
|
+
* @param needle
|
735
|
+
* @param message Message to display on error.
|
736
|
+
*/
|
737
|
+
nestedInclude(haystack: any, needle: any, message?: string): void;
|
738
|
+
|
739
|
+
/**
|
740
|
+
* Asserts that ‘haystack’ does not include ‘needle’. Can be used to assert the absence of a subset of properties in an object.
|
741
|
+
*
|
742
|
+
* Enables the use of dot- and bracket-notation for referencing nested properties.
|
743
|
+
* ‘[]’ and ‘.’ in property names can be escaped using double backslashes.Asserts that ‘haystack’ includes ‘needle’.
|
744
|
+
* Can be used to assert the inclusion of a subset of properties in an object.
|
745
|
+
* Enables the use of dot- and bracket-notation for referencing nested properties.
|
746
|
+
* ‘[]’ and ‘.’ in property names can be escaped using double backslashes.
|
747
|
+
*
|
748
|
+
* @param haystack
|
749
|
+
* @param needle
|
750
|
+
* @param message Message to display on error.
|
751
|
+
*/
|
752
|
+
notNestedInclude(haystack: any, needle: any, message?: string): void;
|
753
|
+
|
754
|
+
/**
|
755
|
+
* Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object while checking for deep equality
|
756
|
+
*
|
757
|
+
* Enables the use of dot- and bracket-notation for referencing nested properties.
|
758
|
+
* ‘[]’ and ‘.’ in property names can be escaped using double backslashes.Asserts that ‘haystack’ includes ‘needle’.
|
759
|
+
* Can be used to assert the inclusion of a subset of properties in an object.
|
760
|
+
* Enables the use of dot- and bracket-notation for referencing nested properties.
|
761
|
+
* ‘[]’ and ‘.’ in property names can be escaped using double backslashes.
|
762
|
+
*
|
763
|
+
* @param haystack
|
764
|
+
* @param needle
|
765
|
+
* @param message Message to display on error.
|
766
|
+
*/
|
767
|
+
deepNestedInclude(haystack: any, needle: any, message?: string): void;
|
768
|
+
|
769
|
+
/**
|
770
|
+
* Asserts that ‘haystack’ does not include ‘needle’. Can be used to assert the absence of a subset of properties in an object while checking for deep equality.
|
771
|
+
*
|
772
|
+
* Enables the use of dot- and bracket-notation for referencing nested properties.
|
773
|
+
* ‘[]’ and ‘.’ in property names can be escaped using double backslashes.Asserts that ‘haystack’ includes ‘needle’.
|
774
|
+
* Can be used to assert the inclusion of a subset of properties in an object.
|
775
|
+
* Enables the use of dot- and bracket-notation for referencing nested properties.
|
776
|
+
* ‘[]’ and ‘.’ in property names can be escaped using double backslashes.
|
777
|
+
*
|
778
|
+
* @param haystack
|
779
|
+
* @param needle
|
780
|
+
* @param message Message to display on error.
|
781
|
+
*/
|
782
|
+
notDeepNestedInclude(haystack: any, needle: any, message?: string): void;
|
783
|
+
|
784
|
+
/**
|
785
|
+
* Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object while ignoring inherited properties.
|
786
|
+
*
|
787
|
+
* @param haystack
|
788
|
+
* @param needle
|
789
|
+
* @param message Message to display on error.
|
790
|
+
*/
|
791
|
+
ownInclude(haystack: any, needle: any, message?: string): void;
|
792
|
+
|
793
|
+
/**
|
794
|
+
* Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the absence of a subset of properties in an object while ignoring inherited properties.
|
795
|
+
*
|
796
|
+
* @param haystack
|
797
|
+
* @param needle
|
798
|
+
* @param message Message to display on error.
|
799
|
+
*/
|
800
|
+
notOwnInclude(haystack: any, needle: any, message?: string): void;
|
801
|
+
|
802
|
+
/**
|
803
|
+
* Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the inclusion of a subset of properties in an object while ignoring inherited properties and checking for deep
|
804
|
+
*
|
805
|
+
* @param haystack
|
806
|
+
* @param needle
|
807
|
+
* @param message Message to display on error.
|
808
|
+
*/
|
809
|
+
deepOwnInclude(haystack: any, needle: any, message?: string): void;
|
810
|
+
|
811
|
+
/**
|
812
|
+
* Asserts that ‘haystack’ includes ‘needle’. Can be used to assert the absence of a subset of properties in an object while ignoring inherited properties and checking for deep equality.
|
813
|
+
*
|
814
|
+
* @param haystack
|
815
|
+
* @param needle
|
816
|
+
* @param message Message to display on error.
|
817
|
+
*/
|
818
|
+
notDeepOwnInclude(haystack: any, needle: any, message?: string): void;
|
819
|
+
|
820
|
+
/**
|
821
|
+
* Asserts that value matches the regular expression regexp.
|
822
|
+
*
|
823
|
+
* @param value Actual value.
|
824
|
+
* @param regexp Potential match of value.
|
825
|
+
* @param message Message to display on error.
|
826
|
+
*/
|
827
|
+
match(value: string, regexp: RegExp, message?: string): void;
|
828
|
+
|
829
|
+
/**
|
830
|
+
* Asserts that value does not match the regular expression regexp.
|
831
|
+
*
|
832
|
+
* @param value Actual value.
|
833
|
+
* @param regexp Potential match of value.
|
834
|
+
* @param message Message to display on error.
|
835
|
+
*/
|
836
|
+
notMatch(expected: any, regexp: RegExp, message?: string): void;
|
837
|
+
|
838
|
+
/**
|
839
|
+
* Asserts that object has a property named by property.
|
840
|
+
*
|
841
|
+
* @type T Type of object.
|
842
|
+
* @param object Container object.
|
843
|
+
* @param property Potential contained property of object.
|
844
|
+
* @param message Message to display on error.
|
845
|
+
*/
|
846
|
+
property<T>(object: T, property: string /* keyof T */, message?: string): void;
|
847
|
+
|
848
|
+
/**
|
849
|
+
* Asserts that object has a property named by property.
|
850
|
+
*
|
851
|
+
* @type T Type of object.
|
852
|
+
* @param object Container object.
|
853
|
+
* @param property Potential contained property of object.
|
854
|
+
* @param message Message to display on error.
|
855
|
+
*/
|
856
|
+
notProperty<T>(object: T, property: string /* keyof T */, message?: string): void;
|
857
|
+
|
858
|
+
/**
|
859
|
+
* Asserts that object has a property named by property, which can be a string
|
860
|
+
* using dot- and bracket-notation for deep reference.
|
861
|
+
*
|
862
|
+
* @type T Type of object.
|
863
|
+
* @param object Container object.
|
864
|
+
* @param property Potential contained property of object.
|
865
|
+
* @param message Message to display on error.
|
866
|
+
*/
|
867
|
+
deepProperty<T>(object: T, property: string, message?: string): void;
|
868
|
+
|
869
|
+
/**
|
870
|
+
* Asserts that object does not have a property named by property, which can be a
|
871
|
+
* string using dot- and bracket-notation for deep reference.
|
872
|
+
*
|
873
|
+
* @type T Type of object.
|
874
|
+
* @param object Container object.
|
875
|
+
* @param property Potential contained property of object.
|
876
|
+
* @param message Message to display on error.
|
877
|
+
*/
|
878
|
+
notDeepProperty<T>(object: T, property: string, message?: string): void;
|
879
|
+
|
880
|
+
/**
|
881
|
+
* Asserts that object has a property named by property with value given by value.
|
882
|
+
*
|
883
|
+
* @type T Type of object.
|
884
|
+
* @type V Type of value.
|
885
|
+
* @param object Container object.
|
886
|
+
* @param property Potential contained property of object.
|
887
|
+
* @param value Potential expected property value.
|
888
|
+
* @param message Message to display on error.
|
889
|
+
*/
|
890
|
+
propertyVal<T, V>(object: T, property: string /* keyof T */, value: V, message?: string): void;
|
891
|
+
|
892
|
+
/**
|
893
|
+
* Asserts that object has a property named by property with value given by value.
|
894
|
+
*
|
895
|
+
* @type T Type of object.
|
896
|
+
* @type V Type of value.
|
897
|
+
* @param object Container object.
|
898
|
+
* @param property Potential contained property of object.
|
899
|
+
* @param value Potential expected property value.
|
900
|
+
* @param message Message to display on error.
|
901
|
+
*/
|
902
|
+
propertyNotVal<T, V>(object: T, property: string /* keyof T */, value: V, message?: string): void;
|
903
|
+
|
904
|
+
/**
|
905
|
+
* Asserts that object has a property named by property, which can be a string
|
906
|
+
* using dot- and bracket-notation for deep reference.
|
907
|
+
*
|
908
|
+
* @type T Type of object.
|
909
|
+
* @type V Type of value.
|
910
|
+
* @param object Container object.
|
911
|
+
* @param property Potential contained property of object.
|
912
|
+
* @param value Potential expected property value.
|
913
|
+
* @param message Message to display on error.
|
914
|
+
*/
|
915
|
+
deepPropertyVal<T, V>(object: T, property: string, value: V, message?: string): void;
|
916
|
+
|
917
|
+
/**
|
918
|
+
* Asserts that object does not have a property named by property, which can be a
|
919
|
+
* string using dot- and bracket-notation for deep reference.
|
920
|
+
*
|
921
|
+
* @type T Type of object.
|
922
|
+
* @type V Type of value.
|
923
|
+
* @param object Container object.
|
924
|
+
* @param property Potential contained property of object.
|
925
|
+
* @param value Potential expected property value.
|
926
|
+
* @param message Message to display on error.
|
927
|
+
*/
|
928
|
+
deepPropertyNotVal<T, V>(object: T, property: string, value: V, message?: string): void;
|
929
|
+
|
930
|
+
/**
|
931
|
+
* Asserts that object has a length property with the expected value.
|
932
|
+
*
|
933
|
+
* @type T Type of object.
|
934
|
+
* @param object Container object.
|
935
|
+
* @param length Potential expected length of object.
|
936
|
+
* @param message Message to display on error.
|
937
|
+
*/
|
938
|
+
lengthOf<T extends { readonly length?: number }>(object: T, length: number, message?: string): void;
|
939
|
+
|
940
|
+
/**
|
941
|
+
* Asserts that fn will throw an error.
|
942
|
+
*
|
943
|
+
* @param fn Function that may throw.
|
944
|
+
* @param message Message to display on error.
|
945
|
+
*/
|
946
|
+
throw(fn: Function, message?: string): void;
|
947
|
+
|
948
|
+
/**
|
949
|
+
* Asserts that function will throw an error with message matching regexp.
|
950
|
+
*
|
951
|
+
* @param fn Function that may throw.
|
952
|
+
* @param regExp Potential expected message match.
|
953
|
+
* @param message Message to display on error.
|
954
|
+
*/
|
955
|
+
throw(fn: Function, regExp: RegExp): void;
|
956
|
+
|
957
|
+
/**
|
958
|
+
* Asserts that function will throw an error that is an instance of constructor.
|
959
|
+
*
|
960
|
+
* @param fn Function that may throw.
|
961
|
+
* @param constructor Potential expected error constructor.
|
962
|
+
* @param message Message to display on error.
|
963
|
+
*/
|
964
|
+
throw(fn: Function, constructor: Function, message?: string): void;
|
965
|
+
|
966
|
+
/**
|
967
|
+
* Asserts that function will throw an error that is an instance of constructor
|
968
|
+
* and an error with message matching regexp.
|
969
|
+
*
|
970
|
+
* @param fn Function that may throw.
|
971
|
+
* @param constructor Potential expected error constructor.
|
972
|
+
* @param message Message to display on error.
|
973
|
+
*/
|
974
|
+
throw(fn: Function, constructor: Function, regExp: RegExp): void;
|
975
|
+
|
976
|
+
/**
|
977
|
+
* Asserts that fn will throw an error.
|
978
|
+
*
|
979
|
+
* @param fn Function that may throw.
|
980
|
+
* @param message Message to display on error.
|
981
|
+
*/
|
982
|
+
throws(fn: Function, message?: string): void;
|
983
|
+
|
984
|
+
/**
|
985
|
+
* Asserts that function will throw an error with message matching regexp.
|
986
|
+
*
|
987
|
+
* @param fn Function that may throw.
|
988
|
+
* @param errType Potential expected message match or error constructor.
|
989
|
+
* @param message Message to display on error.
|
990
|
+
*/
|
991
|
+
throws(fn: Function, errType: RegExp|Function, message?: string): void;
|
992
|
+
|
993
|
+
/**
|
994
|
+
* Asserts that function will throw an error that is an instance of constructor
|
995
|
+
* and an error with message matching regexp.
|
996
|
+
*
|
997
|
+
* @param fn Function that may throw.
|
998
|
+
* @param constructor Potential expected error constructor.
|
999
|
+
* @param message Message to display on error.
|
1000
|
+
*/
|
1001
|
+
throws(fn: Function, errType: Function, regExp: RegExp): void;
|
1002
|
+
|
1003
|
+
/**
|
1004
|
+
* Asserts that fn will throw an error.
|
1005
|
+
*
|
1006
|
+
* @param fn Function that may throw.
|
1007
|
+
* @param message Message to display on error.
|
1008
|
+
*/
|
1009
|
+
Throw(fn: Function, message?: string): void;
|
1010
|
+
|
1011
|
+
/**
|
1012
|
+
* Asserts that function will throw an error with message matching regexp.
|
1013
|
+
*
|
1014
|
+
* @param fn Function that may throw.
|
1015
|
+
* @param regExp Potential expected message match.
|
1016
|
+
* @param message Message to display on error.
|
1017
|
+
*/
|
1018
|
+
Throw(fn: Function, regExp: RegExp): void;
|
1019
|
+
|
1020
|
+
/**
|
1021
|
+
* Asserts that function will throw an error that is an instance of constructor.
|
1022
|
+
*
|
1023
|
+
* @param fn Function that may throw.
|
1024
|
+
* @param constructor Potential expected error constructor.
|
1025
|
+
* @param message Message to display on error.
|
1026
|
+
*/
|
1027
|
+
Throw(fn: Function, errType: Function, message?: string): void;
|
1028
|
+
|
1029
|
+
/**
|
1030
|
+
* Asserts that function will throw an error that is an instance of constructor
|
1031
|
+
* and an error with message matching regexp.
|
1032
|
+
*
|
1033
|
+
* @param fn Function that may throw.
|
1034
|
+
* @param constructor Potential expected error constructor.
|
1035
|
+
* @param message Message to display on error.
|
1036
|
+
*/
|
1037
|
+
Throw(fn: Function, errType: Function, regExp: RegExp): void;
|
1038
|
+
|
1039
|
+
/**
|
1040
|
+
* Asserts that fn will not throw an error.
|
1041
|
+
*
|
1042
|
+
* @param fn Function that may throw.
|
1043
|
+
* @param message Message to display on error.
|
1044
|
+
*/
|
1045
|
+
doesNotThrow(fn: Function, message?: string): void;
|
1046
|
+
|
1047
|
+
/**
|
1048
|
+
* Asserts that function will throw an error with message matching regexp.
|
1049
|
+
*
|
1050
|
+
* @param fn Function that may throw.
|
1051
|
+
* @param regExp Potential expected message match.
|
1052
|
+
* @param message Message to display on error.
|
1053
|
+
*/
|
1054
|
+
doesNotThrow(fn: Function, regExp: RegExp): void;
|
1055
|
+
|
1056
|
+
/**
|
1057
|
+
* Asserts that function will throw an error that is an instance of constructor.
|
1058
|
+
*
|
1059
|
+
* @param fn Function that may throw.
|
1060
|
+
* @param constructor Potential expected error constructor.
|
1061
|
+
* @param message Message to display on error.
|
1062
|
+
*/
|
1063
|
+
doesNotThrow(fn: Function, errType: Function, message?: string): void;
|
1064
|
+
|
1065
|
+
/**
|
1066
|
+
* Asserts that function will throw an error that is an instance of constructor
|
1067
|
+
* and an error with message matching regexp.
|
1068
|
+
*
|
1069
|
+
* @param fn Function that may throw.
|
1070
|
+
* @param constructor Potential expected error constructor.
|
1071
|
+
* @param message Message to display on error.
|
1072
|
+
*/
|
1073
|
+
doesNotThrow(fn: Function, errType: Function, regExp: RegExp): void;
|
1074
|
+
|
1075
|
+
/**
|
1076
|
+
* Compares two values using operator.
|
1077
|
+
*
|
1078
|
+
* @param val1 Left value during comparison.
|
1079
|
+
* @param operator Comparison operator.
|
1080
|
+
* @param val2 Right value during comparison.
|
1081
|
+
* @param message Message to display on error.
|
1082
|
+
*/
|
1083
|
+
operator(val1: OperatorComparable, operator: Operator, val2: OperatorComparable, message?: string): void;
|
1084
|
+
|
1085
|
+
/**
|
1086
|
+
* Asserts that the target is equal to expected, to within a +/- delta range.
|
1087
|
+
*
|
1088
|
+
* @param actual Actual value
|
1089
|
+
* @param expected Potential expected value.
|
1090
|
+
* @param delta Maximum differenced between values.
|
1091
|
+
* @param message Message to display on error.
|
1092
|
+
*/
|
1093
|
+
closeTo(actual: number, expected: number, delta: number, message?: string): void;
|
1094
|
+
|
1095
|
+
/**
|
1096
|
+
* Asserts that the target is equal to expected, to within a +/- delta range.
|
1097
|
+
*
|
1098
|
+
* @param actual Actual value
|
1099
|
+
* @param expected Potential expected value.
|
1100
|
+
* @param delta Maximum differenced between values.
|
1101
|
+
* @param message Message to display on error.
|
1102
|
+
*/
|
1103
|
+
approximately(act: number, exp: number, delta: number, message?: string): void;
|
1104
|
+
|
1105
|
+
/**
|
1106
|
+
* Asserts that set1 and set2 have the same members. Order is not take into account.
|
1107
|
+
*
|
1108
|
+
* @type T Type of set values.
|
1109
|
+
* @param set1 Actual set of values.
|
1110
|
+
* @param set2 Potential expected set of values.
|
1111
|
+
* @param message Message to display on error.
|
1112
|
+
*/
|
1113
|
+
sameMembers<T>(set1: T[], set2: T[], message?: string): void;
|
1114
|
+
|
1115
|
+
/**
|
1116
|
+
* Asserts that set1 and set2 have the same members using deep equality checking.
|
1117
|
+
* Order is not take into account.
|
1118
|
+
*
|
1119
|
+
* @type T Type of set values.
|
1120
|
+
* @param set1 Actual set of values.
|
1121
|
+
* @param set2 Potential expected set of values.
|
1122
|
+
* @param message Message to display on error.
|
1123
|
+
*/
|
1124
|
+
sameDeepMembers<T>(set1: T[], set2: T[], message?: string): void;
|
1125
|
+
|
1126
|
+
/**
|
1127
|
+
* Asserts that set1 and set2 have the same members in the same order.
|
1128
|
+
* Uses a strict equality check (===).
|
1129
|
+
*
|
1130
|
+
* @type T Type of set values.
|
1131
|
+
* @param set1 Actual set of values.
|
1132
|
+
* @param set2 Potential expected set of values.
|
1133
|
+
* @param message Message to display on error.
|
1134
|
+
*/
|
1135
|
+
sameOrderedMembers<T>(set1: T[], set2: T[], message?: string): void;
|
1136
|
+
|
1137
|
+
/**
|
1138
|
+
* Asserts that set1 and set2 don’t have the same members in the same order.
|
1139
|
+
* Uses a strict equality check (===).
|
1140
|
+
*
|
1141
|
+
* @type T Type of set values.
|
1142
|
+
* @param set1 Actual set of values.
|
1143
|
+
* @param set2 Potential expected set of values.
|
1144
|
+
* @param message Message to display on error.
|
1145
|
+
*/
|
1146
|
+
notSameOrderedMembers<T>(set1: T[], set2: T[], message?: string): void;
|
1147
|
+
|
1148
|
+
/**
|
1149
|
+
* Asserts that set1 and set2 have the same members in the same order.
|
1150
|
+
* Uses a deep equality check.
|
1151
|
+
*
|
1152
|
+
* @type T Type of set values.
|
1153
|
+
* @param set1 Actual set of values.
|
1154
|
+
* @param set2 Potential expected set of values.
|
1155
|
+
* @param message Message to display on error.
|
1156
|
+
*/
|
1157
|
+
sameDeepOrderedMembers<T>(set1: T[], set2: T[], message?: string): void;
|
1158
|
+
|
1159
|
+
/**
|
1160
|
+
* Asserts that set1 and set2 don’t have the same members in the same order.
|
1161
|
+
* Uses a deep equality check.
|
1162
|
+
*
|
1163
|
+
* @type T Type of set values.
|
1164
|
+
* @param set1 Actual set of values.
|
1165
|
+
* @param set2 Potential expected set of values.
|
1166
|
+
* @param message Message to display on error.
|
1167
|
+
*/
|
1168
|
+
notSameDeepOrderedMembers<T>(set1: T[], set2: T[], message?: string): void;
|
1169
|
+
|
1170
|
+
/**
|
1171
|
+
* Asserts that subset is included in superset in the same order beginning with the first element in superset.
|
1172
|
+
* Uses a strict equality check (===).
|
1173
|
+
*
|
1174
|
+
* @type T Type of set values.
|
1175
|
+
* @param superset Actual set of values.
|
1176
|
+
* @param subset Potential contained set of values.
|
1177
|
+
* @param message Message to display on error.
|
1178
|
+
*/
|
1179
|
+
includeOrderedMembers<T>(superset: T[], subset: T[], message?: string): void;
|
1180
|
+
|
1181
|
+
/**
|
1182
|
+
* Asserts that subset isn’t included in superset in the same order beginning with the first element in superset.
|
1183
|
+
* Uses a strict equality check (===).
|
1184
|
+
*
|
1185
|
+
* @type T Type of set values.
|
1186
|
+
* @param superset Actual set of values.
|
1187
|
+
* @param subset Potential contained set of values.
|
1188
|
+
* @param message Message to display on error.
|
1189
|
+
*/
|
1190
|
+
notIncludeOrderedMembers<T>(superset: T[], subset: T[], message?: string): void;
|
1191
|
+
|
1192
|
+
/**
|
1193
|
+
* Asserts that subset is included in superset in the same order beginning with the first element in superset.
|
1194
|
+
* Uses a deep equality check.
|
1195
|
+
*
|
1196
|
+
* @type T Type of set values.
|
1197
|
+
* @param superset Actual set of values.
|
1198
|
+
* @param subset Potential contained set of values.
|
1199
|
+
* @param message Message to display on error.
|
1200
|
+
*/
|
1201
|
+
includeDeepOrderedMembers<T>(superset: T[], subset: T[], message?: string): void;
|
1202
|
+
|
1203
|
+
/**
|
1204
|
+
* Asserts that subset isn’t included in superset in the same order beginning with the first element in superset.
|
1205
|
+
* Uses a deep equality check.
|
1206
|
+
*
|
1207
|
+
* @type T Type of set values.
|
1208
|
+
* @param superset Actual set of values.
|
1209
|
+
* @param subset Potential contained set of values.
|
1210
|
+
* @param message Message to display on error.
|
1211
|
+
*/
|
1212
|
+
notIncludeDeepOrderedMembers<T>(superset: T[], subset: T[], message?: string): void;
|
1213
|
+
|
1214
|
+
/**
|
1215
|
+
* Asserts that subset is included in superset. Order is not take into account.
|
1216
|
+
*
|
1217
|
+
* @type T Type of set values.
|
1218
|
+
* @param superset Actual set of values.
|
1219
|
+
* @param subset Potential contained set of values.
|
1220
|
+
* @param message Message to display on error.
|
1221
|
+
*/
|
1222
|
+
includeMembers<T>(superset: T[], subset: T[], message?: string): void;
|
1223
|
+
|
1224
|
+
/**
|
1225
|
+
* Asserts that subset is included in superset using deep equality checking.
|
1226
|
+
* Order is not take into account.
|
1227
|
+
*
|
1228
|
+
* @type T Type of set values.
|
1229
|
+
* @param superset Actual set of values.
|
1230
|
+
* @param subset Potential contained set of values.
|
1231
|
+
* @param message Message to display on error.
|
1232
|
+
*/
|
1233
|
+
includeDeepMembers<T>(superset: T[], subset: T[], message?: string): void;
|
1234
|
+
|
1235
|
+
/**
|
1236
|
+
* Asserts that non-object, non-array value inList appears in the flat array list.
|
1237
|
+
*
|
1238
|
+
* @type T Type of list values.
|
1239
|
+
* @param inList Value expected to be in the list.
|
1240
|
+
* @param list List of values.
|
1241
|
+
* @param message Message to display on error.
|
1242
|
+
*/
|
1243
|
+
oneOf<T>(inList: T, list: T[], message?: string): void;
|
1244
|
+
|
1245
|
+
/**
|
1246
|
+
* Asserts that a function changes the value of a property.
|
1247
|
+
*
|
1248
|
+
* @type T Type of object.
|
1249
|
+
* @param modifier Function to run.
|
1250
|
+
* @param object Container object.
|
1251
|
+
* @param property Property of object expected to be modified.
|
1252
|
+
* @param message Message to display on error.
|
1253
|
+
*/
|
1254
|
+
changes<T>(modifier: Function, object: T, property: string /* keyof T */, message?: string): void;
|
1255
|
+
|
1256
|
+
/**
|
1257
|
+
* Asserts that a function does not change the value of a property.
|
1258
|
+
*
|
1259
|
+
* @type T Type of object.
|
1260
|
+
* @param modifier Function to run.
|
1261
|
+
* @param object Container object.
|
1262
|
+
* @param property Property of object expected not to be modified.
|
1263
|
+
* @param message Message to display on error.
|
1264
|
+
*/
|
1265
|
+
doesNotChange<T>(modifier: Function, object: T, property: string /* keyof T */, message?: string): void;
|
1266
|
+
|
1267
|
+
/**
|
1268
|
+
* Asserts that a function increases an object property.
|
1269
|
+
*
|
1270
|
+
* @type T Type of object.
|
1271
|
+
* @param modifier Function to run.
|
1272
|
+
* @param object Container object.
|
1273
|
+
* @param property Property of object expected to be increased.
|
1274
|
+
* @param message Message to display on error.
|
1275
|
+
*/
|
1276
|
+
increases<T>(modifier: Function, object: T, property: string /* keyof T */, message?: string): void;
|
1277
|
+
|
1278
|
+
/**
|
1279
|
+
* Asserts that a function does not increase an object property.
|
1280
|
+
*
|
1281
|
+
* @type T Type of object.
|
1282
|
+
* @param modifier Function to run.
|
1283
|
+
* @param object Container object.
|
1284
|
+
* @param property Property of object expected not to be increased.
|
1285
|
+
* @param message Message to display on error.
|
1286
|
+
*/
|
1287
|
+
doesNotIncrease<T>(modifier: Function, object: T, property: string /* keyof T */, message?: string): void;
|
1288
|
+
|
1289
|
+
/**
|
1290
|
+
* Asserts that a function decreases an object property.
|
1291
|
+
*
|
1292
|
+
* @type T Type of object.
|
1293
|
+
* @param modifier Function to run.
|
1294
|
+
* @param object Container object.
|
1295
|
+
* @param property Property of object expected to be decreased.
|
1296
|
+
* @param message Message to display on error.
|
1297
|
+
*/
|
1298
|
+
decreases<T>(modifier: Function, object: T, property: string /* keyof T */, message?: string): void;
|
1299
|
+
|
1300
|
+
/**
|
1301
|
+
* Asserts that a function does not decrease an object property.
|
1302
|
+
*
|
1303
|
+
* @type T Type of object.
|
1304
|
+
* @param modifier Function to run.
|
1305
|
+
* @param object Container object.
|
1306
|
+
* @param property Property of object expected not to be decreased.
|
1307
|
+
* @param message Message to display on error.
|
1308
|
+
*/
|
1309
|
+
doesNotDecrease<T>(modifier: Function, object: T, property: string /* keyof T */, message?: string): void;
|
1310
|
+
|
1311
|
+
/**
|
1312
|
+
* Asserts if value is not a false value, and throws if it is a true value.
|
1313
|
+
*
|
1314
|
+
* @type T Type of object.
|
1315
|
+
* @param object Actual value.
|
1316
|
+
* @param message Message to display on error.
|
1317
|
+
* @remarks This is added to allow for chai to be a drop-in replacement for
|
1318
|
+
* Node’s assert class.
|
1319
|
+
*/
|
1320
|
+
ifError<T>(object: T, message?: string): void;
|
1321
|
+
|
1322
|
+
/**
|
1323
|
+
* Asserts that object is extensible (can have new properties added to it).
|
1324
|
+
*
|
1325
|
+
* @type T Type of object
|
1326
|
+
* @param object Actual value.
|
1327
|
+
* @param message Message to display on error.
|
1328
|
+
*/
|
1329
|
+
isExtensible<T>(object: T, message?: string): void;
|
1330
|
+
|
1331
|
+
/**
|
1332
|
+
* Asserts that object is extensible (can have new properties added to it).
|
1333
|
+
*
|
1334
|
+
* @type T Type of object
|
1335
|
+
* @param object Actual value.
|
1336
|
+
* @param message Message to display on error.
|
1337
|
+
*/
|
1338
|
+
extensible<T>(object: T, message?: string): void;
|
1339
|
+
|
1340
|
+
/**
|
1341
|
+
* Asserts that object is not extensible.
|
1342
|
+
*
|
1343
|
+
* @type T Type of object
|
1344
|
+
* @param object Actual value.
|
1345
|
+
* @param message Message to display on error.
|
1346
|
+
*/
|
1347
|
+
isNotExtensible<T>(object: T, message?: string): void;
|
1348
|
+
|
1349
|
+
/**
|
1350
|
+
* Asserts that object is not extensible.
|
1351
|
+
*
|
1352
|
+
* @type T Type of object
|
1353
|
+
* @param object Actual value.
|
1354
|
+
* @param message Message to display on error.
|
1355
|
+
*/
|
1356
|
+
notExtensible<T>(object: T, message?: string): void;
|
1357
|
+
|
1358
|
+
/**
|
1359
|
+
* Asserts that object is sealed (can have new properties added to it
|
1360
|
+
* and its existing properties cannot be removed).
|
1361
|
+
*
|
1362
|
+
* @type T Type of object
|
1363
|
+
* @param object Actual value.
|
1364
|
+
* @param message Message to display on error.
|
1365
|
+
*/
|
1366
|
+
isSealed<T>(object: T, message?: string): void;
|
1367
|
+
|
1368
|
+
/**
|
1369
|
+
* Asserts that object is sealed (can have new properties added to it
|
1370
|
+
* and its existing properties cannot be removed).
|
1371
|
+
*
|
1372
|
+
* @type T Type of object
|
1373
|
+
* @param object Actual value.
|
1374
|
+
* @param message Message to display on error.
|
1375
|
+
*/
|
1376
|
+
sealed<T>(object: T, message?: string): void;
|
1377
|
+
|
1378
|
+
/**
|
1379
|
+
* Asserts that object is not sealed.
|
1380
|
+
*
|
1381
|
+
* @type T Type of object
|
1382
|
+
* @param object Actual value.
|
1383
|
+
* @param message Message to display on error.
|
1384
|
+
*/
|
1385
|
+
isNotSealed<T>(object: T, message?: string): void;
|
1386
|
+
|
1387
|
+
/**
|
1388
|
+
* Asserts that object is not sealed.
|
1389
|
+
*
|
1390
|
+
* @type T Type of object
|
1391
|
+
* @param object Actual value.
|
1392
|
+
* @param message Message to display on error.
|
1393
|
+
*/
|
1394
|
+
notSealed<T>(object: T, message?: string): void;
|
1395
|
+
|
1396
|
+
/**
|
1397
|
+
* Asserts that object is frozen (cannot have new properties added to it
|
1398
|
+
* and its existing properties cannot be removed).
|
1399
|
+
*
|
1400
|
+
* @type T Type of object
|
1401
|
+
* @param object Actual value.
|
1402
|
+
* @param message Message to display on error.
|
1403
|
+
*/
|
1404
|
+
isFrozen<T>(object: T, message?: string): void;
|
1405
|
+
|
1406
|
+
/**
|
1407
|
+
* Asserts that object is frozen (cannot have new properties added to it
|
1408
|
+
* and its existing properties cannot be removed).
|
1409
|
+
*
|
1410
|
+
* @type T Type of object
|
1411
|
+
* @param object Actual value.
|
1412
|
+
* @param message Message to display on error.
|
1413
|
+
*/
|
1414
|
+
frozen<T>(object: T, message?: string): void;
|
1415
|
+
|
1416
|
+
/**
|
1417
|
+
* Asserts that object is not frozen (cannot have new properties added to it
|
1418
|
+
* and its existing properties cannot be removed).
|
1419
|
+
*
|
1420
|
+
* @type T Type of object
|
1421
|
+
* @param object Actual value.
|
1422
|
+
* @param message Message to display on error.
|
1423
|
+
*/
|
1424
|
+
isNotFrozen<T>(object: T, message?: string): void;
|
1425
|
+
|
1426
|
+
/**
|
1427
|
+
* Asserts that object is not frozen (cannot have new properties added to it
|
1428
|
+
* and its existing properties cannot be removed).
|
1429
|
+
*
|
1430
|
+
* @type T Type of object
|
1431
|
+
* @param object Actual value.
|
1432
|
+
* @param message Message to display on error.
|
1433
|
+
*/
|
1434
|
+
notFrozen<T>(object: T, message?: string): void;
|
1435
|
+
|
1436
|
+
/**
|
1437
|
+
* Asserts that the target does not contain any values. For arrays and
|
1438
|
+
* strings, it checks the length property. For Map and Set instances, it
|
1439
|
+
* checks the size property. For non-function objects, it gets the count
|
1440
|
+
* of own enumerable string keys.
|
1441
|
+
*
|
1442
|
+
* @type T Type of object
|
1443
|
+
* @param object Actual value.
|
1444
|
+
* @param message Message to display on error.
|
1445
|
+
*/
|
1446
|
+
isEmpty<T>(object: T, message?: string): void;
|
1447
|
+
|
1448
|
+
/**
|
1449
|
+
* Asserts that the target contains values. For arrays and strings, it checks
|
1450
|
+
* the length property. For Map and Set instances, it checks the size property.
|
1451
|
+
* For non-function objects, it gets the count of own enumerable string keys.
|
1452
|
+
*
|
1453
|
+
* @type T Type of object.
|
1454
|
+
* @param object Object to test.
|
1455
|
+
* @param message Message to display on error.
|
1456
|
+
*/
|
1457
|
+
isNotEmpty<T>(object: T, message?: string): void;
|
1458
|
+
|
1459
|
+
/**
|
1460
|
+
* Asserts that `object` has at least one of the `keys` provided.
|
1461
|
+
* You can also provide a single object instead of a `keys` array and its keys
|
1462
|
+
* will be used as the expected set of keys.
|
1463
|
+
*
|
1464
|
+
* @type T Type of object.
|
1465
|
+
* @param object Object to test.
|
1466
|
+
* @param keys Keys to check
|
1467
|
+
* @param message Message to display on error.
|
1468
|
+
*/
|
1469
|
+
hasAnyKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
1470
|
+
|
1471
|
+
/**
|
1472
|
+
* Asserts that `object` has all and only all of the `keys` provided.
|
1473
|
+
* You can also provide a single object instead of a `keys` array and its keys
|
1474
|
+
* will be used as the expected set of keys.
|
1475
|
+
*
|
1476
|
+
* @type T Type of object.
|
1477
|
+
* @param object Object to test.
|
1478
|
+
* @param keys Keys to check
|
1479
|
+
* @param message Message to display on error.
|
1480
|
+
*/
|
1481
|
+
hasAllKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
1482
|
+
|
1483
|
+
/**
|
1484
|
+
* Asserts that `object` has all of the `keys` provided but may have more keys not listed.
|
1485
|
+
* You can also provide a single object instead of a `keys` array and its keys
|
1486
|
+
* will be used as the expected set of keys.
|
1487
|
+
*
|
1488
|
+
* @type T Type of object.
|
1489
|
+
* @param object Object to test.
|
1490
|
+
* @param keys Keys to check
|
1491
|
+
* @param message Message to display on error.
|
1492
|
+
*/
|
1493
|
+
containsAllKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
1494
|
+
|
1495
|
+
/**
|
1496
|
+
* Asserts that `object` has none of the `keys` provided.
|
1497
|
+
* You can also provide a single object instead of a `keys` array and its keys
|
1498
|
+
* will be used as the expected set of keys.
|
1499
|
+
*
|
1500
|
+
* @type T Type of object.
|
1501
|
+
* @param object Object to test.
|
1502
|
+
* @param keys Keys to check
|
1503
|
+
* @param message Message to display on error.
|
1504
|
+
*/
|
1505
|
+
doesNotHaveAnyKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
1506
|
+
|
1507
|
+
/**
|
1508
|
+
* Asserts that `object` does not have at least one of the `keys` provided.
|
1509
|
+
* You can also provide a single object instead of a `keys` array and its keys
|
1510
|
+
* will be used as the expected set of keys.
|
1511
|
+
*
|
1512
|
+
* @type T Type of object.
|
1513
|
+
* @param object Object to test.
|
1514
|
+
* @param keys Keys to check
|
1515
|
+
* @param message Message to display on error.
|
1516
|
+
*/
|
1517
|
+
doesNotHaveAllKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
1518
|
+
|
1519
|
+
/**
|
1520
|
+
* Asserts that `object` has at least one of the `keys` provided.
|
1521
|
+
* Since Sets and Maps can have objects as keys you can use this assertion to perform
|
1522
|
+
* a deep comparison.
|
1523
|
+
* You can also provide a single object instead of a `keys` array and its keys
|
1524
|
+
* will be used as the expected set of keys.
|
1525
|
+
*
|
1526
|
+
* @type T Type of object.
|
1527
|
+
* @param object Object to test.
|
1528
|
+
* @param keys Keys to check
|
1529
|
+
* @param message Message to display on error.
|
1530
|
+
*/
|
1531
|
+
hasAnyDeepKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
1532
|
+
|
1533
|
+
/**
|
1534
|
+
* Asserts that `object` has all and only all of the `keys` provided.
|
1535
|
+
* Since Sets and Maps can have objects as keys you can use this assertion to perform
|
1536
|
+
* a deep comparison.
|
1537
|
+
* You can also provide a single object instead of a `keys` array and its keys
|
1538
|
+
* will be used as the expected set of keys.
|
1539
|
+
*
|
1540
|
+
* @type T Type of object.
|
1541
|
+
* @param object Object to test.
|
1542
|
+
* @param keys Keys to check
|
1543
|
+
* @param message Message to display on error.
|
1544
|
+
*/
|
1545
|
+
hasAllDeepKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
1546
|
+
|
1547
|
+
/**
|
1548
|
+
* Asserts that `object` contains all of the `keys` provided.
|
1549
|
+
* Since Sets and Maps can have objects as keys you can use this assertion to perform
|
1550
|
+
* a deep comparison.
|
1551
|
+
* You can also provide a single object instead of a `keys` array and its keys
|
1552
|
+
* will be used as the expected set of keys.
|
1553
|
+
*
|
1554
|
+
* @type T Type of object.
|
1555
|
+
* @param object Object to test.
|
1556
|
+
* @param keys Keys to check
|
1557
|
+
* @param message Message to display on error.
|
1558
|
+
*/
|
1559
|
+
containsAllDeepKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
1560
|
+
|
1561
|
+
/**
|
1562
|
+
* Asserts that `object` contains all of the `keys` provided.
|
1563
|
+
* Since Sets and Maps can have objects as keys you can use this assertion to perform
|
1564
|
+
* a deep comparison.
|
1565
|
+
* You can also provide a single object instead of a `keys` array and its keys
|
1566
|
+
* will be used as the expected set of keys.
|
1567
|
+
*
|
1568
|
+
* @type T Type of object.
|
1569
|
+
* @param object Object to test.
|
1570
|
+
* @param keys Keys to check
|
1571
|
+
* @param message Message to display on error.
|
1572
|
+
*/
|
1573
|
+
doesNotHaveAnyDeepKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
1574
|
+
|
1575
|
+
/**
|
1576
|
+
* Asserts that `object` contains all of the `keys` provided.
|
1577
|
+
* Since Sets and Maps can have objects as keys you can use this assertion to perform
|
1578
|
+
* a deep comparison.
|
1579
|
+
* You can also provide a single object instead of a `keys` array and its keys
|
1580
|
+
* will be used as the expected set of keys.
|
1581
|
+
*
|
1582
|
+
* @type T Type of object.
|
1583
|
+
* @param object Object to test.
|
1584
|
+
* @param keys Keys to check
|
1585
|
+
* @param message Message to display on error.
|
1586
|
+
*/
|
1587
|
+
doesNotHaveAllDeepKeys<T>(object: T, keys: Array<Object | string> | { [key: string]: any }, message?: string): void;
|
1588
|
+
}
|
1589
|
+
|
1590
|
+
export interface Config {
|
1591
|
+
/**
|
1592
|
+
* Default: false
|
1593
|
+
*/
|
1594
|
+
includeStack: boolean;
|
1595
|
+
|
1596
|
+
/**
|
1597
|
+
* Default: true
|
1598
|
+
*/
|
1599
|
+
showDiff: boolean;
|
1600
|
+
|
1601
|
+
/**
|
1602
|
+
* Default: 40
|
1603
|
+
*/
|
1604
|
+
truncateThreshold: number;
|
1605
|
+
}
|
1606
|
+
|
1607
|
+
export class AssertionError {
|
1608
|
+
constructor(message: string, _props?: any, ssf?: Function);
|
1609
|
+
name: string;
|
1610
|
+
message: string;
|
1611
|
+
showDiff: boolean;
|
1612
|
+
stack: string;
|
1613
|
+
}
|
1614
|
+
}
|
1615
|
+
|
1616
|
+
declare const chai: Chai.ChaiStatic;
|
1617
|
+
|
1618
|
+
declare module "chai" {
|
1619
|
+
export = chai;
|
1620
|
+
}
|
1621
|
+
|
1622
|
+
interface Object {
|
1623
|
+
should: Chai.Assertion;
|
1624
|
+
}
|