Skip to content

Commit 2795531

Browse files
committed
04/03: polish problem text
1 parent 0d7224c commit 2795531

File tree

1 file changed

+4
-6
lines changed
  • exercises/04.performance/03.problem.test-isolation

1 file changed

+4
-6
lines changed

exercises/04.performance/03.problem.test-isolation/README.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ As with concurrency that we've covered previously, turning off test isolation is
1212

1313
**When you disable test isolation, you're telling Vitest, "_It's alright, I've got the isolation covered myself_."** Isolation as a characteristic of your test suite is _mandatory_ for reliable and trustworthy testing. That is precisely why Vitest comes with isolation built-in—to help you write self-contained, independent tests. You don't need Vitest's test isolation to do that, it just makes it simpler.
1414

15+
<callout-info>Unfortunately, there is no way of knowing whether it's the default test isolation from Vitest that is causing a performance degradation. Your best bet is to try disabling it on a subset of tests (using workspaces) and monitor the outcome.</callout-info>
16+
1517
Isolation is the overarching theme when it comes to test performance. Reliable test runs cannot be achieved without properly isolated tests. This puts a similar list of criteria for disabling test isolation as we had for enabling concurrency:
1618

1719
- Self-contained, independent tests;
@@ -22,10 +24,6 @@ This also means that you can benefit from correctly written tests in more ways t
2224

2325
> I firmly believe that while right decisions are hard, one right decision leads to two right decisions, and so on.
2426
25-
### Reading metrics
26-
27-
Since disabling test isolation is an effort, you have to know if it's the said isolation that contributes to your tests being slow.
28-
29-
TODO:
27+
## Your task
3028

31-
- How do I know that it's test isolation that takes significant time? Is it displayed in some metric in Vitest?
29+
👨‍💼 ...

0 commit comments

Comments
 (0)