def test_validate_invalid_bun_path(mocker: MockerFixture):
    """Test that an error is thrown when a custom specified bun path is not valid
    or does not exist.

    Args:
        mocker: Pytest mocker object.
    """
    mock_path = mocker.Mock()
    mocker.patch("reflex.utils.path_ops.get_bun_path", return_value=mock_path)
    mocker.patch("reflex.utils.path_ops.samefile", return_value=False)
    mocker.patch("reflex.utils.prerequisites.get_bun_version", return_value=None)

    with pytest.raises(click.exceptions.Exit):
        prerequisites.validate_bun()
Test that an error is thrown when a custom specified bun path is not valid
    or does not exist.

    Args:
        mocker: Pytest mocker object.
    
tests/units/utils/test_utils.py