throws | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Function throws

    • Expect a call or promise to throw

      Parameters

      • expect: RegExp

        A regular expression to match the exception message against

      • func_or_promise: () => never

        A function to call, or a promise to await

      • Optionaloptions: Annotation | TestOptions

        Test compare options or annotation

      Returns Error

      The Error object thrown

    • Expect a call or promise to throw

      Parameters

      • expect: RegExp

        A regular expression to match the exception message against

      • func_or_promise: Promise<unknown>

        A function to call, or a promise to await

      • Optionaloptions: Annotation | TestOptions

        Test compare options or annotation

      Returns Promise<Error>

      The Error object thrown

    • Expect a call or promise to throw

      Parameters

      • expect: RegExp

        A regular expression to match the exception message against

      • func_or_promise: () => Promise<unknown>

        A function to call, or a promise to await

      • Optionaloptions: Annotation | TestOptions

        Test compare options or annotation

      Returns Promise<Error>

      The Error object thrown

    • Expect a call or promise to throw

      Parameters

      • expect: RegExp

        A regular expression to match the exception message against

      • func_or_promise: () => unknown

        A function to call, or a promise to await

      • Optionaloptions: Annotation | TestOptions

        Test compare options or annotation

      Returns Error

      The Error object thrown