Skip to content

Commit 075e872

Browse files
committed
address workshop feedback
1 parent 4b8ccc5 commit 075e872

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ speed on some of the tools and concepts we'll be covering:
5050
## System Requirements
5151

5252
- [git][git] v2.18 or greater
53-
- **[NodeJS][node] v23 or greater**
53+
- **[NodeJS][node] v23.11.0 or greater**
5454
- [npm][npm] v8 or greater
5555

5656
All of these must be available in your `PATH`. To verify things are set up

exercises/01.setup/02.solution.multiple-workspaces/README.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ npm test
166166
Duration 221ms (transform 31ms, setup 0ms, collect 30ms, tests 5ms, environment 16ms, prepare 73ms)
167167
```
168168

169-
<callout-success>Motice how Vitest prints the workspace name (`unit` and `edge`) next to the respective test files. This lets you know which workspace is handling that file.</callout-success>
169+
<callout-success>Notice how Vitest prints the workspace name (`unit` and `edge`) next to the respective test files. This lets you know which workspace is handling that file.</callout-success>
170170

171171
But I can also run individual workspaces by providing the `--project` option to the Vitest CLI and giving it the name of the workspace I want to run:
172172

exercises/02.context/02.problem.automatic-fixtures/src/query-user.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { test } from '../test-extend'
22
import { queryUser } from './query-user'
33

4-
test('throws if the user is not found', async () => {
4+
test('returns undefined if the user is not found', async () => {
55
await expect(queryUser('abc-123')).resolves.toBeUndefined()
66
})
77

exercises/02.context/02.solution.automatic-fixtures/src/query-user.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { test } from '../test-extend'
22
import { queryUser } from './query-user'
33

4-
test('throws if the user is not found', async () => {
4+
test('returns undefined if the user is not found', async () => {
55
await expect(queryUser('abc-123')).resolves.toBeUndefined()
66
})
77

exercises/03.assertions/01.solution.custom-matchers/README.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ interface CustomMatchers<MatcherResult = any> {
1414
}
1515
```
1616

17-
Here, I am declaring a new interface called `CustomMatchers` that will describe all the custom matchers I want in my tests. It accepts the `MatcherResult` type argument, which is a requirement in order to make marchers worker correctly with Vitest.
17+
Here, I am declaring a new interface called `CustomMatchers` that will describe all the custom matchers I want in my tests. It accepts the `MatcherResult` type argument, which is a requirement in order to make matchers work correctly with Vitest.
1818

1919
The type definition for the matcher itself describes it as a simple function that accepts a `schema` and returns the `MatchResult`. This is how you can imagine this call signature upon usage:
2020

exercises/03.assertions/05.solution.soft-assertions/README.mdx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ test('cancels the user subscription', () => {
1111
const user = new User()
1212
user.subscribe(new UnlimitedPlan())
1313

14-
expect.(user.subscription.name).toBe('Unlimited')
15-
expect.(user.subscription.kind).toBe('yearly')
16-
expect.(user.subscription.state).toBe('active')
17-
expect.(user.subscription.endsAt).toBeUndefined()
14+
expect(user.subscription.name).toBe('Unlimited')
15+
expect(user.subscription.kind).toBe('yearly')
16+
expect(user.subscription.state).toBe('active')
17+
expect(user.subscription.endsAt).toBeUndefined()
1818
expect.soft(user.subscription.name).toBe('Unlimited')
1919
expect.soft(user.subscription.kind).toBe('yearly')
2020
expect.soft(user.subscription.state).toBe('active')
@@ -89,7 +89,6 @@ This gives me an overview of the entire system, not just the first failed assert
8989

9090
this.endsAt = today.toISOString()
9191
}
92-
}
9392
```
9493

9594
## When to use soft assertions

exercises/04.performance/03.solution.sharding/README.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ These changes can be illustrated in a simple Bash script. Let's call it `run-tes
1111
npx vitest --reporter=blob --shard=1/4 & \
1212
npx vitest --reporter=blob --shard=2/4 & \
1313
npx vitest --reporter=blob --shard=3/4 & \
14-
npx vitest --reporter=blob --shard=4/4
14+
npx vitest --reporter=blob --shard=4/4 & \
15+
wait
1516
```
1617

1718
<callout-info>In this exercise, we are using a script to illustrate a sharded test run. On CI, you can put each individual `npx vitest` command from above into a separate job, splitting the entire test suite into multiple shards.</callout-info>

0 commit comments

Comments
 (0)