Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "api/assertions"

Test description. gT.a

Index

Functions

deleteResultAccumulator

  • deleteResultAccumulator(name: string): void
  • Parameters

    • name: string

    Returns void

equal

  • equal(val1: any, val2: any, msg1: string, msg2: string, doNotShowValues?: undefined | false | true, mode?: AssertionMode): boolean
  • Parameters

    • val1: any
    • val2: any
    • msg1: string
    • msg2: string
    • Optional doNotShowValues: undefined | false | true
    • Optional mode: AssertionMode

    Returns boolean

equalBool

  • equalBool(val1: any, val2: any, msg1: string, msg2: string, doNotShowValues: boolean, mode?: AssertionMode): boolean
  • Parameters

    • val1: any
    • val2: any
    • msg1: string
    • msg2: string
    • doNotShowValues: boolean
    • Optional mode: AssertionMode

    Returns boolean

exception

  • exception(func: Function, expExc?: undefined | string, mode?: AssertionMode): boolean
  • Checks that given func will throw given exception.

    Parameters

    • func: Function
    • Optional expExc: undefined | string
    • Optional mode: AssertionMode

    Returns boolean

exceptionAsync

  • exceptionAsync(asyncFunc: Function, expExc?: undefined | string, mode?: AssertionMode): any
  • Checks that given async func will throw given exception.

    Parameters

    • asyncFunc: Function
    • Optional expExc: undefined | string
    • Optional mode: AssertionMode

    Returns any

getResultFromAccumulator

  • getResultFromAccumulator(name: string): boolean
  • Parameters

    • name: string

    Returns boolean

initResultsAccumulator

  • initResultsAccumulator(name: string): void
  • Parameters

    • name: string

    Returns void

mergeResultToAccumulator

  • mergeResultToAccumulator(res: boolean, name: string): void
  • Parameters

    • res: boolean
    • name: string

    Returns void

notEqualBool

  • notEqualBool(val1: any, val2: any, msg1: string, msg2: string, doNotShowValues: boolean, mode?: AssertionMode): boolean
  • Parameters

    • val1: any
    • val2: any
    • msg1: string
    • msg2: string
    • doNotShowValues: boolean
    • Optional mode: AssertionMode

    Returns boolean

value

  • value(actVal: any, expVal: any, msg: string, mode?: AssertionMode): boolean
  • Checks that value equals to expected value.

    Parameters

    • actVal: any

      actual value.

    • expVal: any

      expected value.

    • msg: string
    • Optional mode: AssertionMode

    Returns boolean

    comparision result.

valueBool

  • valueBool(actVal: any, expVal: any, msg: string, mode?: AssertionMode): boolean
  • Checks that bool value representation equals to expected bool value.

    Parameters

    • actVal: any

      actual value.

    • expVal: any

      expected value.

    • msg: string
    • Optional mode: AssertionMode

    Returns boolean

    comparision result.

valueDeep

  • valueDeep(actVal: any, expVal: any, msg: string, mode?: AssertionMode): boolean
  • Checks that two objects or values are equal. Functions are not supported.

    Parameters

    • actVal: any

      actual value.

    • expVal: any

      expected value.

    • msg: string

      message to describe the entity which you expect.

    • Optional mode: AssertionMode

    Returns boolean

valueNumber

  • valueNumber(actVal: any, expVal: any, msg: string, mode?: AssertionMode): boolean
  • Checks that number value representation equals to expected number.

    Parameters

    • actVal: any

      actual value.

    • expVal: any

      expected value.

    • msg: string
    • Optional mode: AssertionMode

    Returns boolean

    comparision result.

valueStr

  • valueStr(actVal: any, expVal: any, msg: string, mode?: AssertionMode): boolean
  • Checks that string value representation equals to expected string.

    Parameters

    • actVal: any

      actual value.

    • expVal: any

      expected value.

    • msg: string
    • Optional mode: AssertionMode

    Returns boolean

    comparision result.