Function throws

  • Verify that the function throws an error. Thrown error is tested against the wanted param if provided, using t.match().

    Returns false on failure, or the error object thrown on success

    Parameters

    • fn: Function | (() => any)
    • Rest...__namedParameters: ThrowsArgs

    Returns boolean | Error