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

fix: remove extra warning on unset deprecated option #34

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

KuznetsovRoman
Copy link
Member

No description provided.

test/option.js Outdated
@@ -155,6 +166,18 @@ describe('option', () => {
const parser = option({isDeprecated: true});
assert.doesNotThrow(() => parser({}, LAZY_CONFIG), MissingOptionError);
});

it('should not log warning on deprecated option', () => {
Copy link
Member

Choose a reason for hiding this comment

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

"...on deprecated option with default value"

Copy link
Member Author

Choose a reason for hiding this comment

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

It does not warn on deprecated options with default values already.
It does, however, on deprecated option without one.
If option is removed, it doesn't need the default value, and developer might not provide it, assuming, {isDeprecated: true} will not log any warnings. Currently, his assumptions are falsy.

Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed test title to "... without any value"

@KuznetsovRoman KuznetsovRoman force-pushed the TESTPLANE-226.warn_deprecated branch from 448b9a8 to aae31be Compare September 4, 2024 10:28
@KuznetsovRoman KuznetsovRoman merged commit 318ca8d into master Sep 4, 2024
3 checks passed
@KuznetsovRoman KuznetsovRoman deleted the TESTPLANE-226.warn_deprecated branch September 4, 2024 10:33
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