Skip to content

Commit eb46951

Browse files
committed
03: add intro and outro
1 parent 0b20ee7 commit eb46951

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
# Assertions
22

3-
Great job! :tada: Take a rest and let's continue.
3+
Another exercise block covered!
4+
5+
I hope I was successful in infecting you with my love toward assertions. You can use assertions to a great effect to elevate your test experience and make tests more useful.
6+
7+
Now you know how to extend the `expect()` with your custom matchers, teach Vitest to compare the uncomparable, and use built-in APIs for soft and retyable assertions.
8+
9+
These are exactly the things that make good tests great.
10+
11+
But no matter how great your tests are, they lose a lot of value if they are _slow_ 😬. Which brings me to the next exercise block... But before we continue, let's refresh and rest a bit! You want to be at your best because we are going to dissect test performance!

exercises/03.assertions/README.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
# Assertions
22

3-
There's nothing for you to read here but I will have a lot to say on this topic once we come to this exercise!
3+
Assertion is the most important part of any test. Everything you do, all the setup you prepare and actions you carry out exist _only_ so you could write those assertions—your expectations toward the tested system.
4+
5+
And sometimes those expectations can get quite complex! There's so much your code can do. It can bring domain-specific requirements, transition between states asynchronously, or even have multiple criteria to reflect a single expectation.
6+
7+
Throughout this block, you will learn how to get the most out of your assertions. How to create custom matchers and quality testers. How to make tests fail with more context and information, helping you debug them faster. And also how to reflect expectations toward eventual values and states (and I don't mean `vi.waitFor()`; there's a much better way).
8+
9+
Let's go!

exercises/README.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The "Context" block marks the beginning of your customization journey. In this o
2828

2929
### Assertions
3030

31-
An assertion is the most important part of any test. Naturally, this exercise block is focused on crafting perfect assertions.
31+
Assertion is the most important part of any test. Naturally, this exercise block is focused on crafting perfect assertions.
3232

3333
And you will start by writing your _custom matchers_, like `.toMatchSchema()`, learn how to make them type-safe and also explore the practical application of _asymmetric matchers_. Everything to help you be more descriptive in tests.
3434

0 commit comments

Comments
 (0)