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

[patch]: test for boolean in setarg should include aliases #34

Merged
merged 2 commits into from Apr 15, 2023

Conversation

shadowspawn
Copy link
Collaborator

@shadowspawn shadowspawn commented Mar 19, 2023

The check for a boolean option when setting value should take into account aliases. Adding more for completeness and consistency than a practical concern, as especially after other similar bugs checking for aliases of boolean are fixed, this is less likely to come up in a real program!

Found by code inspection, not from usage.

I added a new test file to cover the main behaviours of the existing automatic array behaviour, and then tests related to the bug fix in this PR.

Fixes: #31

@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2023

Codecov Report

Merging #34 (fdbb909) into main (de53490) will not change coverage.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##             main      #34   +/-   ##
=======================================
  Coverage   98.78%   98.78%           
=======================================
  Files           1        1           
  Lines         165      165           
  Branches       70       70           
=======================================
  Hits          163      163           
  Misses          2        2           
Impacted Files Coverage Δ
index.js 98.78% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@shadowspawn shadowspawn marked this pull request as ready for review April 7, 2023 22:55
@shadowspawn shadowspawn changed the title patch: test for boolean in setarg should include aliases [patch]: test for boolean in setarg should include aliases Apr 7, 2023
@shadowspawn shadowspawn force-pushed the fix/31 branch 3 times, most recently from c38e4cf to ab5ac7e Compare April 9, 2023 21:38
@shadowspawn
Copy link
Collaborator Author

(Update: reworked test to follow the example used in #31, rather than use default for setup.)

@ljharb ljharb self-assigned this Apr 15, 2023
@ljharb ljharb merged commit fdbb909 into minimistjs:main Apr 15, 2023
291 checks passed
@shadowspawn shadowspawn deleted the fix/31 branch June 26, 2023 08:32
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.

Override of array behaviour for boolean option does not work for alias
4 participants