Repository URL to install this package:
|
Version:
4.0.0 ▾
|
export interface JestExpectReturn {
message: any
pass: boolean
}
// export interface JestExpecterResult extends Function {
// (this: jest.MatcherUtils, received: any, ...actual: any[]): JestExpectReturn
// }
export interface JestExpecterResult extends Function {
(received: any, ...actual: any[]): JestExpectReturn
}
export interface JestExpectFactory extends Function {
(
predicate: Predicate,
key: string,
passMsg: Msg,
failMsg: Msg
): JestExpecterResult
}
export interface ExoticJestExpecterMap {
toBeSpecies: Predicate
toBeArguments: Predicate
toBePairs: Predicate
toBeArray: Predicate
toBeNonEmptyArray: Predicate
toBeObjTag: Predicate
toBeNonEmptyObj: Predicate
toBeObjTypeof: Predicate
toBeObjPure: Predicate
toBeObjPlain: Predicate
toBeObjNotNull: Predicate
toBeAsync: Predicate
toBePromise: Predicate
toBeBoolean: Predicate
toBeDate: Predicate
toBeError: Predicate
toBeEmpty: Predicate
toBeFunction: Predicate
toBeGenerator: Predicate
toBeInfinite: Predicate
toBeExtensible: Predicate
toBePrimitive: Predicate
toBeEnumerable: Predicate
toBeNaN: Predicate
// toBeInstanceOf: Predicate
// toBeNull: Predicate
// toBeNil: Predicate
toBeNumber: Predicate
toBeReal: Predicate
toBeSymbol: Predicate
toBeZero: Predicate
toBeFalse: Predicate
toBeTrue: Predicate
toBeRegExp: Predicate
toBeString: Predicate
toBeObj: Predicate
toBeFlattenable: Predicate
toBeFloat: Predicate
toBeTypedArray: Predicate
toBeWeakSet: Predicate
toBeWeakMap: Predicate
toBeSet: Predicate
toBeMap: Predicate
toBeCollection: Predicate
toBeSize: Predicate
toBeFrozen: Predicate
toBeSealed: Predicate
toBeUndefined: Predicate
toBeUndefinedLike: Predicate
toBeURL: Predicate
toBeValidArrayIndex: Predicate
toBeSafe: Predicate
toBeNotEmpty: Predicate
toBeAction: Predicate
toBeComputed: Predicate
toBeBoxedObservable: Predicate
toBeObservable: Predicate
toBeObservableArray: Predicate
toBeObservableObject: Predicate
toBeObservableMap: Predicate
toBeStringOrNumber: Predicate
[key: string]: Predicate
}
export interface ExoticJestExpect {
toBeSpecies: JestExpecterResult
toBeArguments: JestExpecterResult
toBePairs: JestExpecterResult
toBeArray: JestExpecterResult
toBeNonEmptyArray: JestExpecterResult
toBeObjTag: JestExpecterResult
toBeNonEmptyObj: JestExpecterResult
toBeObjTypeof: JestExpecterResult
toBeObjPure: JestExpecterResult
toBeObjPlain: JestExpecterResult
toBeObjNotNull: JestExpecterResult
toBeAsync: JestExpecterResult
toBePromise: JestExpecterResult
toBeBoolean: JestExpecterResult
toBeDate: JestExpecterResult
toBeError: JestExpecterResult
toBeEmpty: JestExpecterResult
toBeFunction: JestExpecterResult
toBeGenerator: JestExpecterResult
toBeInfinite: JestExpecterResult
toBeExtensible: JestExpecterResult
toBePrimitive: JestExpecterResult
toBeEnumerable: JestExpecterResult
toBeInstanceOf: JestExpecterResult
toBeNaN: JestExpecterResult
toBeNull: JestExpecterResult
toBeNil: JestExpecterResult
toBeNumber: JestExpecterResult
toBeReal: JestExpecterResult
toBeSymbol: JestExpecterResult
toBeZero: JestExpecterResult
toBeFalse: JestExpecterResult
toBeTrue: JestExpecterResult
toBeRegExp: JestExpecterResult
toBeString: JestExpecterResult
toBeObj: JestExpecterResult
toBeFlattenable: JestExpecterResult
toBeFloat: JestExpecterResult
toBeTypedArray: JestExpecterResult
toBeWeakSet: JestExpecterResult
toBeWeakMap: JestExpecterResult
toBeSet: JestExpecterResult
toBeMap: JestExpecterResult
toBeCollection: JestExpecterResult
toBeSize: JestExpecterResult
toBeFrozen: JestExpecterResult
toBeSealed: JestExpecterResult
toBeUndefined: JestExpecterResult
toBeUndefinedLike: JestExpecterResult
toBeURL: JestExpecterResult
toBeValidArrayIndex: JestExpecterResult
//
toBeSafe: JestExpecterResult
toBeNotEmpty: JestExpecterResult
//
toBeAction: JestExpecterResult
toBeComputed: JestExpecterResult
toBeBoxedObservable: JestExpecterResult
toBeObservable: JestExpecterResult
toBeObservableArray: JestExpecterResult
toBeObservableObject: JestExpecterResult
toBeObservableMap: JestExpecterResult
toBeStringOrNumber: JestExpecterResult
[key: string]: JestExpecterResult
}
// expected == actual?
export interface Predicate<Expected = any, Received = any> extends Function {
(received: Received, expected: Expected): boolean
}
export interface PassFailArgs<Received = any, Actual = any> {
// property name of the extension
// example: isArray
key: string
received: Received
actual: Actual
}
export interface MsgFunction {
(args: PassFailArgs): string
}
export type Msg = string | MsgFunction | undefined