<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Vitest on AI VOID</title><link>https://ai-blog.noorshomelab.dev/tags/vitest/</link><description>Recent content in Vitest on AI VOID</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 11 Feb 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://ai-blog.noorshomelab.dev/tags/vitest/index.xml" rel="self" type="application/rss+xml"/><item><title>Chapter 13: Testing Strategies: Unit, Integration, E2E, and Contract Testing</title><link>https://ai-blog.noorshomelab.dev/react-production-guide-2026/testing-strategies-react/</link><pubDate>Wed, 11 Feb 2026 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/react-production-guide-2026/testing-strategies-react/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Welcome to Chapter 13! In the fast-paced world of web development, shipping new features quickly is exciting, but doing so &lt;em&gt;reliably&lt;/em&gt; is crucial. This is where testing comes in. Imagine deploying a new version of your React application only to discover a critical bug that breaks a core user flow. Frustrating, right? Testing isn&amp;rsquo;t just about finding bugs; it&amp;rsquo;s about building confidence in your codebase, ensuring maintainability, and providing a safety net for future changes.&lt;/p&gt;</description></item><item><title>Project Chapter 15.6: Testing Core Components and Services (with Vitest)</title><link>https://ai-blog.noorshomelab.dev/angular-v21-mastery/chapter-15-6-testing-core-components-and-services/</link><pubDate>Wed, 20 Aug 2025 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/angular-v21-mastery/chapter-15-6-testing-core-components-and-services/</guid><description>&lt;h2 id="project-chapter-156-testing-core-components-and-services-with-vitest"&gt;Project Chapter 15.6: Testing Core Components and Services (with Vitest)&lt;/h2&gt;
&lt;p&gt;We&amp;rsquo;ve built a functional user management application, leveraging many Angular v21 features. Now, it&amp;rsquo;s critical to ensure its reliability and maintainability through testing. In this chapter, we&amp;rsquo;ll write unit tests for our &lt;code&gt;UserService&lt;/code&gt; and &lt;code&gt;UserListComponent&lt;/code&gt; using &lt;strong&gt;Vitest&lt;/strong&gt;, which is the new default testing framework in Angular v21.&lt;/p&gt;
&lt;p&gt;This will put our knowledge of Vitest, &lt;code&gt;TestBed&lt;/code&gt;, mocking, and &lt;code&gt;fixture.whenStable()&lt;/code&gt; into practical use.&lt;/p&gt;</description></item><item><title>Vitest: The New Default Testing Framework</title><link>https://ai-blog.noorshomelab.dev/angular-v21-mastery/chapter-7-vitest-intro/</link><pubDate>Wed, 20 Aug 2025 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/angular-v21-mastery/chapter-7-vitest-intro/</guid><description>&lt;h2 id="vitest-the-new-default-testing-framework"&gt;Vitest: The New Default Testing Framework&lt;/h2&gt;
&lt;p&gt;For a long time, Angular projects defaulted to Karma as the test runner and Jasmine as the testing framework. While this setup has served the community well, Karma has been deprecated since 2023, and the JavaScript testing ecosystem has evolved significantly. Modern tools offer faster execution, better developer experience, and closer alignment with current JavaScript module standards.&lt;/p&gt;
&lt;p&gt;Angular v21 addresses this by introducing &lt;strong&gt;Vitest as the new standard testing framework for newly created projects.&lt;/strong&gt; This is a significant shift that brings several compelling benefits to Angular developers.&lt;/p&gt;</description></item><item><title>Writing Tests with Vitest: Hands-on Practice</title><link>https://ai-blog.noorshomelab.dev/angular-v21-mastery/chapter-8-vitest-practical/</link><pubDate>Wed, 20 Aug 2025 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/angular-v21-mastery/chapter-8-vitest-practical/</guid><description>&lt;h2 id="writing-tests-with-vitest-hands-on-practice"&gt;Writing Tests with Vitest: Hands-on Practice&lt;/h2&gt;
&lt;p&gt;In the previous chapter, we introduced Vitest and understood &lt;em&gt;why&lt;/em&gt; it&amp;rsquo;s the new default. Now, let&amp;rsquo;s get our hands dirty and write some actual tests. You&amp;rsquo;ll find that writing tests with Vitest in Angular feels very familiar if you&amp;rsquo;ve used Jasmine/Jest before, as Vitest adopts a similar API.&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;ll start with a basic component test and then a service test.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Prerequisite:&lt;/strong&gt; A new Angular v21 project (e.g., &lt;code&gt;ng new vitest-demo --standalone&lt;/code&gt;) should already be configured with Vitest.&lt;/p&gt;</description></item></channel></rss>