Skip to content

Commit 66d3788

Browse files
committed
Add small update to part5 vitest test output example
1 parent 77330d5 commit 66d3788

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

src/content/5/en/part5c.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,21 +133,18 @@ Run the test with command _npm test_:
133133
$ npm test
134134

135135
> notes-frontend@0.0.0 test
136-
> vitest
136+
> vitest run
137137

138138

139-
DEV v1.3.1 /Users/mluukkai/opetus/2024-fs/part3/notes-frontend
139+
RUN v3.2.3 /home/vejolkko/repot/fullstack-examples/notes-frontend
140140

141-
✓ src/components/Note.test.jsx (1)
142-
✓ renders content
141+
✓ src/components/Note.test.jsx (1 test) 19ms
142+
✓ renders content 18ms
143143

144144
Test Files 1 passed (1)
145145
Tests 1 passed (1)
146-
Start at 17:05:37
147-
Duration 812ms (transform 31ms, setup 220ms, collect 11ms, tests 14ms, environment 395ms, prepare 70ms)
148-
149-
150-
PASS Waiting for file changes...
146+
Start at 14:31:54
147+
Duration 874ms (transform 51ms, setup 169ms, collect 19ms, tests 19ms, environment 454ms, prepare 87ms)
151148
```
152149

153150
Eslint complains about the keywords _test_ and _expect_ in the tests. The problem can be solved by adding the following configuration to the <i>eslint.config.js</i> file:

src/content/5/fi/osa5c.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,21 +135,18 @@ Suoritetaan testi:
135135
$ npm test
136136

137137
> notes-frontend@0.0.0 test
138-
> vitest
138+
> vitest run
139139

140140

141-
DEV v1.3.1 /Users/mluukkai/opetus/2024-fs/part3/notes-frontend
141+
RUN v3.2.3 /home/vejolkko/repot/fullstack-examples/notes-frontend
142142

143-
✓ src/components/Note.test.jsx (1)
144-
✓ renders content
143+
✓ src/components/Note.test.jsx (1 test) 19ms
144+
✓ renders content 18ms
145145

146146
Test Files 1 passed (1)
147147
Tests 1 passed (1)
148-
Start at 17:05:37
149-
Duration 812ms (transform 31ms, setup 220ms, collect 11ms, tests 14ms, environment 395ms, prepare 70ms)
150-
151-
152-
PASS Waiting for file changes...
148+
Start at 14:31:54
149+
Duration 874ms (transform 51ms, setup 169ms, collect 19ms, tests 19ms, environment 454ms, prepare 87ms)
153150
```
154151

155152
Kuten olettaa saattaa, testi menee läpi.

0 commit comments

Comments
 (0)