Skip to content

fix: use nullish coalescing for coverage directory paths #439

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

Merged
merged 1 commit into from
Mar 5, 2021
Merged

fix: use nullish coalescing for coverage directory paths #439

merged 1 commit into from
Mar 5, 2021

Conversation

vladjerca
Copy link
Contributor

@vladjerca vladjerca commented Mar 4, 2021

Situation:

I want to output everything in ./coverage this cannot be easily achieve at the moment. If the subdirectory is set to '', it will fallback to the browser-name value.

Alternative:

At the moment I'm doing the following to achieve the desired result on my project:

'html': {
    'directory': 'coverage',
    'subdirectory': () => '',
},
'lcovonly': {
    'directory': 'coverage',
    'subdirectory': () => '',
},

Solution:

Use nullish, this way the defaults will be used only when the values are undefined or null.

@erikbarke erikbarke merged commit d8a89dd into monounity:master Mar 5, 2021
@erikbarke
Copy link
Collaborator

Hey, thanks ☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants