etr2460 commented on issue #11688: URL: https://github.com/apache/incubator-superset/issues/11688#issuecomment-733912178
I don't think anything here was mentioning getting rid of unit tests, right? My assumption was that RTL would live as a way to test components and be a possible, even preferred alternative to the current use of Enzyme. That, along with the fact that Enzyme is falling behind in terms of support, made it seem reasonable to start using RTL over Enzyme for new tests, especially ones involving hooks. That's also ignoring the accessibly centric design of RTL, where as you write RTL tests, you also improve the accessibly of the application for folks with screen readers and who rely on semantic html attributes. Finally, to Rob's question in the VOTE thread: React hooks have been around for over 2 years now, and there's been significant adoption of hooks as a preferred alternative to HOCs for code reuse and extensibility. Additionally, although it hasn't been explicitly recommended to use hooks within superset-frontend, they're being used increasingly more often, and therefore we need a testing solution for them. I'm biased as I prefer Functional Components + hooks when building my UIs, but I don't think i'm alone there. In conclusion, I voted `+1` because: - RTL has increased functionality for parts of our code that Enzyme doesn't cover - RTL helps improve a11y throughout our codebase - This SIP does not reduce focus on unit or e2e tests, but instead adds additional focus to React component testing Hope this clears some stuff up! ---------------------------------------------------------------- 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]
