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

Update stub-builder.ts to support falsy overrides #23

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

darcyrush
Copy link
Contributor

The current override logic checks if an override property exists by using falsy logic to check its value, so if an override defined with a value of false or 0, the override will instead be mocked.

Using the in operator checks if the property exists rather than checking the value of the property, allowing these overrides

@ShellyDCMS ShellyDCMS merged commit 6f4b4b2 into ShellyDCMS:main Aug 19, 2024
1 of 2 checks passed
@ShellyDCMS
Copy link
Owner

thank you @darcyrush !

@darcyrush darcyrush deleted the patch-2 branch August 20, 2024 05:21
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