Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

Constructor

Constructor: Function & object

CustomAsyncMatcherFactory

CustomAsyncMatcherFactory: function

Type declaration

CustomEqualityTester

CustomEqualityTester: function

Type declaration

    • (first: any, second: any): boolean | void
    • Parameters

      • first: any
      • second: any

      Returns boolean | void

CustomMatcherFactory

CustomMatcherFactory: function

Type declaration

CustomObjectFormatter

CustomObjectFormatter: function

Type declaration

    • (value: unknown): string | undefined
    • Parameters

      • value: unknown

      Returns string | undefined

Expected

Expected<T>: T | ObjectContaining<T> | AsymmetricMatcher<any> | Any | Spy | object

Type parameters

  • T

ExpectedRecursive

ExpectedRecursive<T>: T | ObjectContaining<T> | AsymmetricMatcher<any> | object

Type parameters

  • T

Func

Func: function

Type declaration

    • (...args: any[]): any
    • Parameters

      • Rest ...args: any[]

      Returns any

ImplementationCallback

ImplementationCallback: function | function | function

MatchableArgs

MatchableArgs<Fn>: Fn extends function ? object : never

Type parameters

  • Fn

NonTypedSpyObj

NonTypedSpyObj<T>: SpyObj<object>

It's like SpyObj, but doesn't verify argument/return types for functions. Useful if TS cannot correctly infer type for complex objects.

Type parameters

  • T

PromisedRejectType

PromisedRejectType<Fn>: Fn extends function ? any : never

Obtains the type that a promise-returning function can be rejected with. This is so we can use .and.rejectWith() only for functions that return a promise.

Type parameters

  • Fn: Function

PromisedReturnType

PromisedReturnType<Fn>: Fn extends function ? TResult : never

Obtains the promised type that a promise-returning function resolves to.

Type parameters

SpecFunction

SpecFunction: function

Type declaration

    • (spec?: Spec): void
    • Parameters

      • Optional spec: Spec

      Returns void

SpyObj

SpyObj<T>: T & object

Type parameters

  • T

SpyObjMethodNames

SpyObjMethodNames<T>: T extends undefined ? ReadonlyArray<string> | object : ReadonlyArray<keyof T> | object

Type parameters

  • T

SpyObjPropertyNames

SpyObjPropertyNames<T>: T extends undefined ? ReadonlyArray<string> | object : ReadonlyArray<keyof T> | object

Type parameters

  • T

Variables

DEFAULT_TIMEOUT_INTERVAL

DEFAULT_TIMEOUT_INTERVAL: number

Default number of milliseconds Jasmine will wait for an asynchronous spec to complete.

HtmlReporter

HtmlReporter: HtmlReporter

HtmlSpecFilter

HtmlSpecFilter: HtmlSpecFilter

MAX_PRETTY_PRINT_ARRAY_LENGTH

MAX_PRETTY_PRINT_ARRAY_LENGTH: number

Maximum number of array elements to display when pretty printing objects. This will also limit the number of keys and values displayed for an object. Elements past this number will be ellipised.

MAX_PRETTY_PRINT_CHARS

MAX_PRETTY_PRINT_CHARS: number

Maximum number of charasters to display when pretty printing objects. Characters past this number will be ellipised.

MAX_PRETTY_PRINT_DEPTH

MAX_PRETTY_PRINT_DEPTH: number

Maximum object depth the pretty printer will print to. Set this to a lower value to speed up pretty printing if you have large objects.

matchersUtil

matchersUtil: MatchersUtil

Functions

DiffBuilder

  • Returns DiffBuilder

addAsyncMatchers

addCustomEqualityTester

  • Parameters

    Returns void

addCustomObjectFormatter

addMatchers

  • Parameters

    Returns void

any

  • That will succeed if the actual value being compared is an instance of the specified class/constructor.

    Parameters

    Returns AsymmetricMatcher<any>

anything

  • That will succeed if the actual value being compared is not null and not undefined.

    Returns AsymmetricMatcher<any>

arrayContaining

  • Type parameters

    • T

    Parameters

    Returns ArrayContaining<T>

arrayWithExactContents

  • Type parameters

    • T

    Parameters

    Returns ArrayContaining<T>

clock

  • Returns Clock

createSpy

  • createSpy<Fn>(name?: string, originalFn?: Fn): Spy<Fn>
  • Type parameters

    Parameters

    • Optional name: string
    • Optional originalFn: Fn

    Returns Spy<Fn>

createSpyObj

empty

  • That will succeed if the actual value being compared is empty.

    since

    3.1.0

    Returns AsymmetricMatcher<any>

falsy

  • That will succeed if the actual value being compared is null, undefined, 0, false or anything falsey.

    since

    3.1.0

    Returns AsymmetricMatcher<any>

formatErrorMsg

  • formatErrorMsg(domain: string, usage: string): function
  • Parameters

    • domain: string
    • usage: string

    Returns function

      • (msg: string): string
      • Parameters

        • msg: string

        Returns string

getEnv

  • getEnv(): Env
  • Returns Env

notEmpty

  • That will succeed if the actual value being compared is not empty.

    since

    3.1.0

    Returns AsymmetricMatcher<any>

objectContaining

  • Type parameters

    • T

    Parameters

    • sample: object

    Returns ObjectContaining<T>

pp

  • pp(value: any): string
  • Parameters

    • value: any

    Returns string

setDefaultSpyStrategy

  • setDefaultSpyStrategy<Fn>(fn?: function): void
  • Type parameters

    Parameters

    • Optional fn: function
        • Parameters

          Returns void

    Returns void

stringMatching

  • Parameters

    • str: string | RegExp

    Returns AsymmetricMatcher<string>

truthy

  • That will succeed if the actual value being compared is true or anything truthy.

    since

    3.1.0

    Returns AsymmetricMatcher<any>

Generated using TypeDoc