Si trabajas con #ReactTestingLibrary y quieres aprender a usar .mockReturnValue() y .mockResolvedValue(), de #Jest, para simular funciones síncronas y asíncronas acabas de encontrar tu post 😉. Te lo contamos aquí 👇
Al hacer pruebas unitarias con #ReactTestingLibrary, es frecuente simular el comportamiento de una función. Aprende a usar .mockReturnValue() y .mockResolvedValue() de Jest para simular funciones síncronas y asíncronas 👇
🔥 Day 20 of UNLOCKING REACT : Testing with React Testing Library! 🔥
👉Ensuring the reliability of components is crucial. We can build resilient apps that enhance user experience by focusing on user interactions.
#React#ReactTestingLibrary#webdeveloper#Code#WebDevelopment
Je suis ravi de vous annoncer le lancement de ma nouvelle formation sur les TESTS REACT avec RTL et JEST ! Agissez rapidement et profitez de l'offre de lancement sur Udemy. (Offre limitée)
#React#testing#ReactTestingLibrary#JestTesting
Super benefits of using #ReactTestingLibrary
👉 Easier to write tests
👉 Ensure app works as expected
👉 Doesn't test React implementation details
👉 More maintainable
👉 Promote to write accessible code.
@elizfunk#React#JavaScript#FrontEnd
What if there was a `debugDiff()` function in #ReactTestingLibrary that would only log out what's changed since the last debug?
I feel like I would use that all the time to avoid hunting for the resulting changes in the markup from events I fire.
Thoughts?
🔥 Day 20 of UNLOCKING REACT : Testing with React Testing Library! 🔥
👉Ensuring the reliability of components is crucial. We can build resilient apps that enhance user experience by focusing on user interactions.
#React#ReactTestingLibrary#webdeveloper#Code#WebDevelopment
🚀 Excited about BDD for React apps! 🧪 I have used RTL with BDD for testing React components. Which BDD framework have you used or are currently using? Share your insights! #BDD#ReactTestingLibrary#ReactDevelopment
📢@danieljcafonso favourite #React libraries are...
"#ReactTestingLibrary - testing is important & I like to sleep well at night. And #ReactQuery. If you've to deal with data fetching, you'll be aware it's very tricky. React Query has made it so easy"
➡
#ReactTestingLibrary has made testing so easy that even I can write some tests here and there now.
Thank you very much, @kentcdodds for all of your awesome OSS projects.