-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(yaml): add yaml as valid file format #1
base: main-enterprise
Are you sure you want to change the base?
Conversation
@dabcoder Nice! Can you also update the README and remove the comment about |
Thanks for the feedback @anderssonjohan. I can certainly update the README. |
@dabcoder If I were you I would start by isolating the code under test into a helper function and test that. Then you only have to test the changed logic and not everything around it.
function getRepoOverrideConfig(repoConfigs, repository) {
return repoConfigs[`${repository.repo}.yml`];
}
const repoConfigs = { "repository.yaml": "yaml file was picked" };
const repo = { repo: "repository" };
expect(getRepoOverrideConfig(repoConfigs, repo).toEqual("yaml file was picked");
const repoConfigs = { "repository.yml": "yml file was picked" };
const repo = { repo: "repository" };
expect(getRepoOverrideConfig(repoConfigs, repo).toEqual("yml file was picked");
const repoConfigs = { "repository.yaml": "yaml file was picked", "repository.yml": "yml file was picked" };
const repo = { repo: "repository" };
expect(getRepoOverrideConfig(repoConfigs, repo).toEqual("yml file was picked"); |
|
To keep discussing github#700