def METHOD_NAME(self):
    with patch("subprocess.check_output") as check_output:
        check_output.side_effect = subprocess.CalledProcessError(
            1, ["yarn", "config", "list"], b"", stderr=b"yarn config failed."
        )
        logger = logging.getLogger("jupyterlab")
        config = commands._yarn_config(logger)
        self.assertDictEqual(config, {"yarn config": {}, "npm config": {}})