@nevware21/tripwire - v0.1.8
    Preparing search index...

    Function changesButNotByFunc

    Asserts that executing the target function changes the monitored value but NOT by the specific delta. The value MUST change, but the change amount must not equal the specified delta (considering sign).

    The current IAssertScope object

    A function that returns a value to monitor, or an object containing the property to monitor

    The property name to monitor (used when first argument is not an object) or the delta that should NOT match

    The delta that should NOT match (sign is ignored, only absolute value matters)

    Optional message to display if the assertion fails

    The current IAssertScope.that object

    • Asserts that executing the target function changes the monitored value but NOT by the specific delta. The value MUST change, but the change amount must not equal the specified delta (considering sign).

      Type Parameters

      • R

      Parameters

      • this: IAssertScope

        The current IAssertScope object

      • func: () => any

        A function that returns a value to monitor

      • delta: number

        The delta that should NOT match (sign is ignored, only absolute value matters)

      • OptionalevalMsg: MsgSource

        Optional message to display if the assertion fails

      Returns R

      The current IAssertScope.that object

    • Asserts that executing the target function changes the monitored value but NOT by the specific delta. The value MUST change, but the change amount must not equal the specified delta (considering sign).

      Type Parameters

      • R
      • T = any

      Parameters

      • this: IAssertScope

        The current IAssertScope object

      • target: T

        An object containing the property to monitor

      • prop: keyof T

        The property name to monitor

      • delta: number | MsgSource

        The delta that should NOT match (sign is ignored, only absolute value matters)

      • OptionalevalMsg: MsgSource

        Optional message to display if the assertion fails

      Returns R

      The current IAssertScope.that object