<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Claudio marzella on Medium]]></title>
        <description><![CDATA[Stories by Claudio marzella on Medium]]></description>
        <link>https://medium.com/@marzellaclaudio?source=rss-90b6e87db4c3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bKt7CC1ppLvCWJC__tIV1w.png</url>
            <title>Stories by Claudio marzella on Medium</title>
            <link>https://medium.com/@marzellaclaudio?source=rss-90b6e87db4c3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 04:23:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@marzellaclaudio/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Testing App]]></title>
            <link>https://medium.com/@marzellaclaudio/testing-app-69f8d200cf2c?source=rss-90b6e87db4c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/69f8d200cf2c</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[jest]]></category>
            <category><![CDATA[components]]></category>
            <dc:creator><![CDATA[Claudio marzella]]></dc:creator>
            <pubDate>Mon, 04 Jul 2022 08:01:36 GMT</pubDate>
            <atom:updated>2022-07-04T08:01:36.065Z</atom:updated>
            <content:encoded><![CDATA[<p>Are you written the entire code of a new app and the build it’s successful and done, great, but you’ve tested all components UI and their logics? <br>Testing require time-consuming but are essential for written a good code and can bring an improvement to the app’s performance reducing manual test.<br>In this article i’ll show you the basic to test an app.</p><h3><strong>Snapshot Test</strong></h3><p>UI testing plays a significant role before an application is released to production, the visual component it’s important for the interactions of the user and to meeting the design developed. Snapshot tests are a very useful tool whenever you want to make sure your UI does not change unexpectedly<br>when there are a change in the styles of a component and to prevent unexpected regression. A typical snapshot test case renders a UI component, takes a snapshot, then compares it to a reference snapshot file stored alongside the test. The test compares the current state of your application to the established snapshots stored in the file system. The image below show you the flow in a typical snapshot test in Jest framework</p><figure><img alt="Snapshot test flow" src="https://cdn-images-1.medium.com/max/590/1*y27SCplEm4OMlnaDC1IdSQ.jpeg" /></figure><h3><strong>Unit Test</strong></h3><p>This type of test is focused on individual components, functions, modules called units, the purpose of unit testing is to validate that each unit of the software performs as designed. Units that have no dependencies are called <strong>isolated (solitary) units.</strong><br> The <strong>Sociable unit tests</strong> fail if the dependencies of a sociable unit are also failing. The tested unit is not supposed to work if its dependencies don’t work, so a failing test in this case is a good sign.<br>The essential technique to achieve a successful unit test is “Mocking”, where code parts are replaced by dummy implementations that emulate real code. Mocks are especially useful when it’s expensive or impractical to include a dependency directly into our tests, for example, in cases where your code is making HTTP calls to an API or interacting with the database layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r03utXR18MHEN2FBksmQdQ.png" /></figure><h3><strong>Component Test</strong></h3><p>Component testing, also known as program or module testing, is done after unit testing. In this type of testing those test objects can be tested independently as a component without integrating with other components e.g. modules, classes, objects, and programs. This testing is done by the development team. This kind of test is like unit testing with the difference that the developer uses real data instead of dummy (Mock) data for testing of the written code. There are two main types of component test:</p><ul><li><strong>Component Testing in Small (CTIS) — </strong>when component testing is done in isolation with other components</li><li><strong>Component Testing in Large (CTIL) — </strong>when component testing is done without isolation with other components of the software</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69f8d200cf2c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s New in Next.js 12.2?]]></title>
            <link>https://javascript.plainenglish.io/whats-new-in-next-js-12-2-e5cae2db0b4c?source=rss-90b6e87db4c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5cae2db0b4c</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Claudio marzella]]></dc:creator>
            <pubDate>Sun, 03 Jul 2022 11:36:10 GMT</pubDate>
            <atom:updated>2023-01-05T14:00:47.112Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VrZijRuSBSuDoYtf" /><figcaption>Photo by <a href="https://unsplash.com/@clark_fransa?utm_source=medium&amp;utm_medium=referral">Arnold Francisca</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Next.js is a React framework that helps you in the construction of blocks.<br>When you are developing a block in React, there are multiple things to control (User Interface, Data fetching, Routing, Rendering Performance, etc). Next.js facilitates solving these common application requirements. Now let’s see the new features of version 12.2.</p><h3>Middleware stable</h3><p>This property was released in October 2021 (Next.js 12.0) and remained in beta until the new version of the framework 12.2. Middleware is a simple piece of code that allows us to change the response to a request before it finishes. In summary, the new changes are :</p><ul><li>Middleware can no longer produce a response body. (To respect the differences in client-side and server-side navigation, and to help ensure that developers do not build insecure Middleware, we are removing the ability to send response bodies in Middleware. This ensures that Middleware is only used to “rewrite”, “redirect”, or modify the incoming request.)</li><li>If your Middleware <em>does</em> respond with a body, a runtime error will be thrown.</li><li>Migrate to using rewrite/redirect to pages/APIs handling a response.</li></ul><h3>The Edge</h3><p>The performance of an application is affected by different reasons such as the location of the user or where the server is located. With the lightweight Edge runtime, many components are offloaded to the globally distributed Edge infrastructure, which improves performance and the user experience.</p><h3>SWC</h3><p>The Next.js Compiler, written in Rust using <a href="http://swc.rs/">SWC</a>, allows Next.js to transform and minify your JavaScript code for production. This replaces Babel for individual files and Terser for minifying output bundles.<br>We chose to build on SWC for a few reasons:</p><ul><li>Extensibility: SWC can be used as a Crate inside Next.js, without having to fork the library or workaround design constraints.</li><li>Performance: We were able to achieve ~3x faster Fast Refresh and ~5x faster builds in Next.js by switching to SWC, with more room for optimization still in progress.</li><li>WebAssembly: Rust’s support for WASM is essential for supporting all possible platforms and taking Next.js development everywhere.</li><li>Community: The Rust community and ecosystem are amazing and still growing.</li></ul><h3><strong>On-Demand Incremental Static Regeneration (Stable)</strong></h3><p>How many times can you redeploy in a work day? On-Demand Incremental Static Regeneration (ISR) allows you to update the content on your site without needing to redeploy. This makes it easy to update your site immediately when data changes in your headless CMS or commerce platform. This was one of the most requested features from the community and we’re excited it is now stable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Iay3Jawn0rcqS63b797rA.png" /></figure><p>Incremental Static Regeneration works for any providers supporting the <a href="https://nextjs.org/docs/deployment#nextjs-build-api">Next.js Build API</a> (next build). When deployed to <a href="https://vercel.com/">Vercel</a>, on-demand revalidation propagates globally in ~300ms when pushing pages to the edge.</p><h3><strong>Other improvements</strong></h3><ul><li>Support for Emotion transform in the Next.js Compiler. Most features of @emotion/babel-plugin are now supported, and unless you are using importMap, it can be removed. For more information, <a href="https://nextjs.org/docs/advanced-features/compiler#emotion">check out the documentation</a>.</li><li>Better support for the styled-components transform in the Next.js Compiler by allowing customization of the default options, including the cssProp option. For more information, <a href="https://nextjs.org/docs/advanced-features/compiler#styled-components">check out the documentation</a>.</li><li>Better support for JavaScript ES Modules, so components like next/image and next/link can properly be imported.</li><li>next/link no longer requires manually adding &lt;a&gt; as a child. You can now <a href="https://github.com/vercel/next.js/pull/36436">opt into this behavior</a> in a backward-compatible way.</li><li>We’ve added experimental support for shipping only modern JavaScript by modifying browsersList. You can opt into this behavior by setting browsersListForSwc: true and legacyBrowsers: false in the experimental option of next.config.js.</li><li>New @swc/helpers optimizations prevent duplication across bundles, reducing bundle size by around 2KB in a minimal configuration, and more on larger apps</li><li>We’ve significantly reduced the Next.js install size. We did this by moving our monorepo to pnpm, which allows us to remove duplicate packages while creating the pre-compiled versions that we use. This leads to a reduction in install size of 14MB.</li></ul><h4>Further Reading</h4><p><a href="https://javascript.plainenglish.io/data-fetching-with-next-js-13s-bleeding-edge-features-a-primer-a60ddd3f7570">Data Fetching with Next.js 13’s Bleeding-Edge Features — A Primer</a></p><p><em>More content at </em><a href="https://plainenglish.io/"><strong><em>PlainEnglish.io</em></strong></a><em>. Sign up for our </em><a href="http://newsletter.plainenglish.io/"><strong><em>free weekly newsletter</em></strong></a><em>. Follow us on </em><a href="https://twitter.com/inPlainEngHQ"><strong><em>Twitter</em></strong></a><em> and </em><a href="https://www.linkedin.com/company/inplainenglish/"><strong><em>LinkedIn</em></strong></a><em>. Check out our </em><a href="https://discord.gg/GtDtUAvyhW"><strong><em>Community Discord</em></strong></a><em> and join our </em><a href="https://inplainenglish.pallet.com/talent/welcome"><strong><em>Talent Collective</em></strong></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5cae2db0b4c" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/whats-new-in-next-js-12-2-e5cae2db0b4c">What’s New in Next.js 12.2?</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>