Skip to content
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

refactor(config): Better prefix handling and enhanced coverage #12083

Merged
merged 5 commits into from
Oct 9, 2021

Conversation

zharinov
Copy link
Collaborator

@zharinov zharinov commented Oct 9, 2021

Changes:

Test uncovered exception handling

Context:

Ref: #12069

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

viceice
viceice previously approved these changes Oct 9, 2021
import * as env from './env';

process.exit = jest.fn() as never;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use jest.spyOn instead.

@zharinov
Copy link
Collaborator Author

zharinov commented Oct 9, 2021

Ah, wait a minute, I'll also fix my own FIXME labels here...

@@ -182,6 +224,25 @@ describe('workers/global/config/parse/env', () => {
expect(config.enabled).toBe(false);
expect(config.token).toBe('a');
});
describe('malformed RENOVATE_CONFIG', () => {
let processExit;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a type

lib/workers/global/config/parse/env.spec.ts Show resolved Hide resolved
@viceice
Copy link
Member

viceice commented Oct 9, 2021

Anything else to do?

@rarkins rarkins merged commit 1b6ea24 into renovatebot:main Oct 9, 2021
@zharinov zharinov deleted the refactor/env-config-parse branch October 9, 2021 07:11
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 27.31.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants