from pathlib import Path
import yaml


def fixture_config_file(config_dir: Path, configs: dict) -> Path:
    """Create a config file and return the path to it"""
    conf_path = config_dir / "config.json"
    with open(conf_path, "w") as out_file:
        yaml.dump(configs, out_file)
    return conf_path