You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/5/en/part5c.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ The course previously used the [Jest](http://jestjs.io/) library developed by Fa
20
20
Let's start by installing Vitest and the [jsdom](https://github.com/jsdom/jsdom) library simulating a web browser:
21
21
22
22
```
23
-
npm install --save-vitest vitest jsdom
23
+
npm install --save-dev vitest jsdom
24
24
```
25
25
26
26
In addition to Vitest, we also need another testing library that will help us render components for testing purposes. The current best option for this is [react-testing-library](https://github.com/testing-library/react-testing-library) which has seen rapid growth in popularity in recent times. It is also worth extending the expressive power of the tests with the library [jest-dom](https://github.com/testing-library/jest-dom).
@@ -95,7 +95,7 @@ Notice that the <i>li</i> element has the value <i>note</i> for the [CSS](https:
95
95
96
96
### Rendering the component for tests
97
97
98
-
We will write our test in the <i>src/components/Note.test.js</i> file, which is in the same directory as the component itself.
98
+
We will write our test in the <i>src/components/Note.test.jsx</i> file, which is in the same directory as the component itself.
99
99
100
100
The first test verifies that the component renders the contents of the note:
0 commit comments