jaredh159 / tailwind-react-native-classnames

simple, expressive API for tailwindcss + react-native
2.08k stars 84 forks source link

Test toStyleVal #277

Closed doong-jo closed 9 months ago

jaredh159 commented 9 months ago

thanks for the PR! appreciate the contribution. 😄

i don't think i'm going to merge this one, because of my personal testing philosophy. i prefer (most of the time) to test the external, public API of my libraries, and not to directly test the internal implementations, or helper functions. this isn't a hard and fast rule, because sometimes a piece of internal implementation is difficult to test through an external API, and the logic is tricky enough to warrant it's own tests (like in screens.spec.ts in this library).

but, for this toStyleVal() helper, i consider this an internal implementation detail, and it's already heavily tested via the many tests of tw.style() and friends. so i don't think these tests add enough value, and would have to be maintained and updated if i were to change the details of how this helper worked.

for the same reasons, i'm going to close the PR testing parseInputs() as well. but the third PR about the auto configuration, is very interesting to me, and i'm definitely open to that.

thanks again!