Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface InverseAsymmetricMatchers

Hierarchy

  • InverseAsymmetricMatchers

Index

Methods

arrayContaining

  • arrayContaining<E>(arr: E[]): any
  • expect.not.arrayContaining(array) matches a received array which does not contain all of the elements in the expected array. That is, the expected array is not a subset of the received array. It is the inverse of expect.arrayContaining.

    Optionally, you can provide a type for the elements via a generic.

    Type parameters

    • E

    Parameters

    • arr: E[]

    Returns any

objectContaining

  • objectContaining<E>(obj: E): any
  • expect.not.objectContaining(object) matches any received object that does not recursively match the expected properties. That is, the expected object is not a subset of the received object. Therefore, it matches a received object which contains properties that are not in the expected object. It is the inverse of expect.objectContaining.

    Optionally, you can provide a type for the object via a generic. This ensures that the object contains the desired structure.

    Type parameters

    • E

    Parameters

    • obj: E

    Returns any

stringContaining

  • stringContaining(str: string): any
  • expect.not.stringContaining(string) matches the received string that does not contain the exact expected string. It is the inverse of expect.stringContaining.

    Parameters

    • str: string

    Returns any

stringMatching

  • stringMatching(str: string | RegExp): any
  • expect.not.stringMatching(string | regexp) matches the received string that does not match the expected regexp. It is the inverse of expect.stringMatching.

    Parameters

    Returns any