Skip to main content
CF

Advanced Vitest Patterns

1h 43m 59s
English
Paid

Do you know that feeling when a tool "clicks"? When you stop perceiving it merely as a means to an end and start using it as a true tool for creating better solutions. That's exactly what we want to achieve with Vitest.

In this course, you will go beyond the basics and become a true "super user" of Vitest. You will learn to understand the inner workings of the test runner, create your own test scenarios, and use this flexibility to solve complex tasks—from highly complex tests to performance issues.

Course Benefits

This course is about customization and how to make Vitest your tool for confident and productive work. By the end of the course, you will feel at home with Vitest and be able to build testing systems of any level of complexity.

What You Will Learn

  • A deep understanding and configuration of Vitest: Master the fundamental configuration options to tailor Vitest to your specific needs.
  • Creating your own testing environments: Develop custom environments to accurately simulate production scenarios.
  • Using custom fixtures, matchers, and equality testers: Learn to create and use these elements for precise and adaptable testing strategies.
  • Organizing tests for real, complex applications: Discover strategies to maintain clarity and efficiency in your test organization, even in large codebases.
  • Approaches to setting up the testing process for your tasks: Explore various methodologies to seamlessly integrate testing into your development workflow.

Additional

https://github.com/epicweb-dev/advanced-vitest-patterns

About the Author: Artem Zakharchenko

Artem Zakharchenko thumbnail

Artem Zakharchenko is a Ukrainian software engineer best known as the creator of Mock Service Worker (MSW) — the de-facto standard for API mocking in modern JavaScript test suites — and as a lead instructor on the EpicWeb.dev testing track alongside Kent C. Dodds.

His CourseFlix listing carries four Artem Zakharchenko courses: Testing Fundamentals (EpicWeb), Mocking Techniques in Vitest, Advanced Vitest Patterns, and React Component Testing with Vitest. Material is paid and aimed at JavaScript developers who want to make testing a first-class part of their workflow rather than an afterthought.

Watch Online 38 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 38 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Advanced Vitest Patterns Introduction
All Course Lessons (38)
#Lesson TitleDurationAccess
1
Advanced Vitest Patterns Introduction Demo
01:33
2
Setup Introduction
00:15
3
Visual Studio Code extension
03:24
4
Visual Studio Code extension solution
03:15
5
Multiple Workspaces
00:59
6
Multiple Workspaces Solution
06:09
7
Code Coverage
01:36
8
Code Coverage Solution
04:54
9
Setup Outro
00:12
10
Context Introduction
02:11
11
Custom Fixtures
01:45
12
Custom Fixtures Solution
09:35
13
Automatic Fixtures
02:43
14
Automatic Fixtures Solution
04:05
15
Context Outro
00:21
16
Assertions Introduction
01:12
17
Custom Matchers
02:25
18
Custom Matchers Solution
08:00
19
Asymmetric Matchers
02:52
20
Asymmetric Matchers Solution
02:40
21
Custom Equality Testers
02:05
22
Custom Equality Testers Solution
03:26
23
Retryable Assertions
01:29
24
Retryable Assertions Solution
03:35
25
Soft Assertions
02:56
26
Soft Assertions Solution
04:54
27
Assertions Outro
00:43
28
Performance Introduction
01:16
29
Profiling Slow Te
02:26
30
Profiling Slow Te Solution
06:11
31
Concurrency
02:14
32
Concurrency Solution
02:59
33
Isolation
01:21
34
Isolation Solution
01:43
35
Sharding
00:38
36
Sharding Solution
04:43
37
Performance Outro
00:51
38
Advanced Vitest Patterns Outro
00:23
Unlock unlimited learning

Get instant access to all 37 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Related courses

Frequently asked questions

What are the prerequisites for enrolling in this course?
To get the most out of this course, students should have a foundational understanding of JavaScript and basic testing principles. Familiarity with Vitest basics is also recommended, as the course delves into advanced configurations and customizations that assume prior knowledge of how Vitest operates at a fundamental level.
What kind of projects or systems will I learn to build using this course?
The course focuses on creating complex testing systems tailored to various needs. You'll learn to develop custom testing environments to simulate production scenarios, design custom fixtures, matchers, and equality testers, and organize tests for large-scale applications. This setup allows you to handle highly complex tests and address performance issues effectively.
Who is the target audience for this course?
This course is designed for developers who already have a basic understanding of Vitest and wish to deepen their skills. It's ideal for those looking to become 'super users' of Vitest by learning to customize and optimize their testing frameworks for complex tasks in large applications.
How does the depth and scope of this course compare to other Vitest courses?
Unlike introductory courses, this course covers advanced topics such as custom testing environments, custom fixtures and matchers, and optimizing performance with techniques like concurrency and sharding. It aims to provide a comprehensive understanding of Vitest's inner workings and advanced configuration options.
What specific tools or platforms are covered in this course?
The course includes lessons that integrate Vitest with Visual Studio Code, covering the use of extensions to enhance your development environment. Additionally, it explores tools for profiling and optimizing test performance, such as concurrency and isolation techniques.
What topics are not covered in this course?
The course does not cover basic testing principles or introductory Vitest usage, as it assumes prior knowledge. It focuses exclusively on advanced patterns and configurations, so those seeking an introduction to Vitest should consider foundational courses first.
How can the skills learned in this course be applied to other areas or careers?
The skills developed in this course, such as creating custom testing environments and optimizing test performance, are transferable to any software development role that requires thorough testing practices. Understanding how to configure and customize testing frameworks will also be beneficial for roles focused on quality assurance and software reliability.