Skip to content

Commit afe252c

Browse files
committed
add resources to readme
1 parent c98d1f2 commit afe252c

File tree

4 files changed

+21
-10
lines changed

4 files changed

+21
-10
lines changed

Diff for: README.md

+15-6
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,27 @@
2929

3030
## Prerequisites
3131

32-
- TODO: add prerequisites
33-
- Some
34-
- Pre-requisite
35-
- links
36-
- here
32+
You don't have to have any prior experience with Vitest or Vitest Broweser Mode
33+
to complete this workshop.
34+
35+
- **A basic experience with TypeScript is required.**
36+
- **A basic experience with component-level testing is beneficial.** This
37+
workshop works best if you've written component tests in the past. But don't
38+
worry if you haven't, you will write a bunch of those during the workshop!
39+
- Get familiar with
40+
[React Testing Library](https://testing-library.com/docs/react-testing-library/intro/),
41+
especially its
42+
[Guiding Principles](https://testing-library.com/docs/guiding-principles). You
43+
don't need to have any prior experience of using the library.
3744

3845
## Pre-workshop Resources
3946

4047
Here are some resources you can read before taking the workshop to get you up to
4148
speed on some of the tools and concepts we'll be covering:
4249

43-
- TODO: add resources
50+
- [**Why I Won't Use JSDOM**](https://www.epicweb.dev/why-i-won-t-use-jsdom)
51+
- [The Golden Rule of Assertion](https://www.epicweb.dev/the-golden-rule-of-assertions)
52+
- [True Purpose of Testing](https://www.epicweb.dev/the-true-purpose-of-testing)
4453

4554
## System Requirements
4655

Diff for: exercises/01.sunsetting-jsdom/01.problem.break-jsdom/README.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ In this exercise, you have a simple React application that previews the files yo
66

77
You can run and play around with the application using this command:
88

9-
```sh
9+
```sh nonumber
1010
npm run dev
1111
```
1212

Diff for: exercises/01.sunsetting-jsdom/01.solution.break-jsdom/README.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ Here, two things have my interest:
2323

2424
I reflect those two expectations like so:
2525

26-
```tsx
26+
```tsx nonumber nocopy
2727
expect(screen.getByText('file.txt')).toBeTruthy()
2828
expect(screen.getByText('hello world')).toBeTruthy()
2929
```
3030

3131
Looks like the first test is done. All that's left is to run via `npm test` and... Oh, no.
3232

33-
```sh
33+
```sh nonumber nocopy
3434
FAIL src/file-preview.test.tsx > displays the preview card
3535
TypeError: file.text is not a function
3636
❯ src/file-preview.tsx:7:8
@@ -47,7 +47,7 @@ Except it's not. The `<FilePreview />` component calls the [`Blob.prototype.text
4747
4848
Turns out, the `Blob.prototype.text` method isn't implemented in JSDOM. You can reproduce this in isolation as well by running this code:
4949
50-
```ts
50+
```ts nonumber
5151
import { JSDOM } from 'jsdom'
5252
5353
const dom = new JSDOM()

Diff for: exercises/README.mdx

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
# React Component Testing with Vitest
2+
3+
Hi! Welcome to the React Component Testing workshop!

0 commit comments

Comments
 (0)