<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lucas Q</title>
    <description>The latest articles on DEV Community by Lucas Q (@__lucasq).</description>
    <link>https://dev.to/__lucasq</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F461660%2Fe7593781-0284-4a43-9270-1524a287b154.jpeg</url>
      <title>DEV Community: Lucas Q</title>
      <link>https://dev.to/__lucasq</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/__lucasq"/>
    <language>en</language>
    <item>
      <title>Testing a React App with React Testing Library</title>
      <dc:creator>Lucas Q</dc:creator>
      <pubDate>Wed, 18 May 2022 17:20:01 +0000</pubDate>
      <link>https://dev.to/__lucasq/testing-a-react-app-with-react-testing-library-2kmn</link>
      <guid>https://dev.to/__lucasq/testing-a-react-app-with-react-testing-library-2kmn</guid>
      <description>&lt;p&gt;A step by step guide on how to test a React App (made in Next.js in this case) with React Testing Library.&lt;/p&gt;

&lt;p&gt;I created a very simple Next.js app to demonstrate how to test the whole functionality of it and approach different blockers when writing unit tests.&lt;/p&gt;

&lt;p&gt;In this post I cover:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Testing component’s behavior and emulating user events to assess for the expected result.&lt;/li&gt;
&lt;li&gt;Mocking API calls with msw library.&lt;/li&gt;
&lt;li&gt;Mocking custom and node_modules components imports in case they should not be included in our tests.&lt;/li&gt;
&lt;li&gt;Accessing to env variables in our tests.&lt;/li&gt;
&lt;li&gt;Troubleshooting some common errors we discovered while testing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://medium.com/white-prompt-blog/testing-a-react-app-with-react-testing-library-rtl-a782b8409fb"&gt;Link to the blogpost&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hope you enjoy it! If you have any doubts you can reach me at&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/lucas-quinteiro-81421678/"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>nextjs</category>
    </item>
  </channel>
</rss>
