@haraldki/unittesterjs - v2.0.0
    Preparing search index...

    Class TestIgnored

    If a test method throws an instance of this class, it is assumed that the test has been ignored. Typically you would have

    if (some condition where the test makes no sense) {
    throw new TestIgnored("an explanation")
    }

    at the start of a test function. Adding it somehwere in the middle would be somewhat silly.

    Hierarchy

    • Error
      • TestIgnored
    Index

    Constructors

    Properties

    Methods

    Constructors

    • Creates the instance with an optional message to describe why the test method is ignored.

      Parameters

      • Optionalmsg: string

      Returns TestIgnored

    Properties

    cause?: unknown
    message: string
    name: string
    stack?: string

    Methods

    • Throws an instance of TestIgnored created with the given message. Use it to briefly disable a test without getting the compiler warning about unused code from directly calling throw new TestIgnored(...).

      Parameters

      • msg: string

        to be logged to explain why the test is ignored

      Returns TestIgnored