Loading
Current section: Introduction 1 exercises
lesson

Testing Fundamentals Workshop Introduction

Transcript

00:00 Hey, hello, and welcome to the Testing Fundamentals Workshop! My name is Artem, and I'm so excited because you're about to learn everything you need to learn to test any code at any level. And you will do so by writing your own little version of Vitest. This whole workshop is split into a number of exercises, and you will be solving actual real-world problems

00:19 by writing tests for TypeScript code that changes and evolves over time. First, you will focus on the principles. Those are the essential mental models to get right to approach testing anything. You will learn what role intention and implementation play in tests, and how you can focus on one to help you write better tests. Then, you will dive head-deep into testing structure,

00:39 because everything is more clear when you know what it's made of. You will write your own expect function that will help you write assertions and tests more declaratively, as well as the test function that will provide the isolation and help you report test results independently. Then, you will move the tests written into a separate module and expose those tests and expect functions globally,

00:59 both type-wise and runtime-wise. And of course, you will learn about the testing setup and introduce your before-all and after-all hooks to help you tackle side effects introduced by the code that you're testing. Then, you will focus on testing asynchronous code, and you will see how the testing strategy differs based on the synchronicity you can or cannot control.

01:18 And of course, we're going to cover testing promise rejections, because it's not always about the happy path alone. And then finally, you will migrate all the tests that you've written to the actual testing framework, to Vitest, and you will see how everything that you learn throughout the workshop seamlessly transfers between the tools. I'm so excited, because every journey has a beginning,

01:38 and your testing journey begins here and now. So, good luck, and see you in the first exercise.