<?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: LamNVQ</title>
    <description>The latest articles on DEV Community by LamNVQ (@dawngate).</description>
    <link>https://dev.to/dawngate</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%2F1019002%2Fcef23778-57bf-42d1-bac8-1143af6dcaee.png</url>
      <title>DEV Community: LamNVQ</title>
      <link>https://dev.to/dawngate</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dawngate"/>
    <language>en</language>
    <item>
      <title>Nextjs + Cypress + Code coverage Setup</title>
      <dc:creator>LamNVQ</dc:creator>
      <pubDate>Tue, 27 Aug 2024 15:29:00 +0000</pubDate>
      <link>https://dev.to/dawngate/nextjs-cypress-code-coverage-setup-36p</link>
      <guid>https://dev.to/dawngate/nextjs-cypress-code-coverage-setup-36p</guid>
      <description>&lt;p&gt;For quickly understand,&lt;/p&gt;

&lt;p&gt;Give a look in my current project:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/DawnGate/nextjs-cypress-code-coverage" rel="noopener noreferrer"&gt;https://github.com/DawnGate/nextjs-cypress-code-coverage&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I struggle with config nextjs + cypress + babel + istanbul for Code coverage in 2 days.&lt;/p&gt;

&lt;p&gt;And after research, try and test. I created a public repo for quickly setup a new project, and I want to other can easy to setup.&lt;/p&gt;

&lt;p&gt;For quick summary:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create new project with "npm i create-next-app@latest"&lt;/li&gt;
&lt;li&gt;Install cypress, @cypress/code-coverage, babel-plugin-istanbul&lt;/li&gt;
&lt;li&gt;Using babel to override the swc compiler (remember remove next/font -&amp;gt; you will find some documents talk about it)&lt;/li&gt;
&lt;li&gt;Config cypress, babelrc.json, add api/coverage for get &lt;strong&gt;coverage&lt;/strong&gt; data from server-side component of Nextjs (Please read the source code for more information)&lt;/li&gt;
&lt;li&gt;npx cypress open or npx cypress run =&amp;gt; check your coverage report and Done!&lt;/li&gt;
&lt;/ul&gt;

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