from pathlib import Path


def fake_home_folder_miniforge(tmp_path_factory):
    """
    Returns a faked $HOME folder. Should be used as the return
    value from pathlib.Path.home().

    Designed to test the auto detection of conda environment
    storage directory.
    """

    fake_home: Path = tmp_path_factory.mktemp("home")

    anaconda = fake_home.joinpath("miniforge3/envs")
    anaconda.mkdir(parents=True)

    return fake_home