eschutho commented on issue #11688:
URL: 
https://github.com/apache/incubator-superset/issues/11688#issuecomment-733945209


   Thanks for the clarification @ktmud and @etr2460. I do not have any 
opposition to adding a new library, but with this library, as you mentioned, 
comes a methodology of front end testing, which is to test from the perspective 
of the user. In this strategy, KCD expresses that you shouldn't test 
"implementation details", or look at state, or what a function returns. "Those 
things aren't important to users. You should only focus on what the user sees, 
etc."
   
   I think that these are fine principles for integration tests, although I 
understand that people still call these "unit tests", and apologies if my use 
of wording there was vague. I still believe that there is value in testing that 
a function receives an argument and reliably outputs what you expect, 
specifically in smaller react components, and leave the larger "view" 
components that are composed of smaller components to use this "integration 
testing" approach from the user's perspective. 
   
   I believe this tool brings a heavier weight with it in terms of how you test 
in general, and I am aiming to raise the concern that in some cases, you should 
assert on the return value of a function, and I believe that we should see this 
"user-focused approach" as just 1/3 of the total testing picture. 
   
   So to separate the two concerns, if RTL fixes problems with enzyme, then +1 
on that, but I believe that with adoption of this library, we should have 
perhaps a larger discussions about how to test our code in general rather than 
assume that in using this library, we need to adopt all the principles behind 
it. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to