Skip to content

Commit fe02896

Browse files
committed
docs: πŸ“ update exercise instructions for clarity and consistency
1 parent a9acb10 commit fe02896

File tree

2 files changed

+30
-10
lines changed

2 files changed

+30
-10
lines changed

β€Ždocs/instructions/2-test-doubles.mdβ€Ž

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,50 @@ In this exercise, you'll learn to use test doubles _(Fakes to be more specific)_
1818

1919
### πŸ“ Steps
2020

21-
#### 1. Replace the `RecipeRepository` with a fake repository
21+
#### 1. Run tests
22+
23+
```sh
24+
pnpm test
25+
```
26+
27+
#### 2. Open `src/app/recipe/recipe-search.integration.spec.ts`
28+
29+
#### 3. Replace the `RecipeRepository` with a fake repository
2230

2331
```diff
2432
- TestBed.configureTestingModule({ providers: [provideHttpClient()] });
2533
+ TestBed.configureTestingModule({ providers: [provideRecipeRepositoryFake()] });
2634
```
2735

28-
#### 2. Configure the fake repository
36+
#### 4. Configure the fake repository
2937

3038
```ts
3139
TestBed.inject(RecipeRepositoryFake).setRecipes(...);
3240
```
3341

34-
#### 3. Update test helper functions
42+
Cf. [πŸ“– Appendices](#-appendices)
43+
44+
## 🎯 Goal #2: `RecipeSearch` filters recipes by keywords
45+
46+
Add a test that checks that `RecipeSearch` filters recipes by keywords when the user types keywords in an input labeled "Keywords".
47+
48+
### πŸ“ Steps
3549

36-
#### 4. Run tests
50+
#### 1. Run tests
3751

3852
```sh
3953
pnpm test
4054
```
4155

42-
## 🎯 Goal #2: `RecipeSearch` filters recipes by keywords
56+
#### 2. Add a test that checks that `RecipeSearch` filters recipes by keywords when the user types keywords in an input labeled "Keywords".
4357

44-
Add a test that checks that `RecipeSearch` filters recipes by keywords when the user types keywords in an input labeled "Keywords".
58+
Cf. [πŸ“– Appendices](#-appendices)
59+
60+
#### 3. Checkout the implementation if you went with the TDD approach:
61+
62+
```sh
63+
pnpm cook checkout-impl
64+
```
4565

4666
## πŸ“– Appendices
4767

β€Ždocs/instructions/3-refactor-signals.mdβ€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ In this exercise, you'll modernize the `RecipeSearch` component by refactoring f
1818

1919
### πŸ“ Steps
2020

21-
#### 1. Checkout the new implementation of `RecipeSearch`
21+
#### 1. Run tests
2222

2323
```sh
24-
pnpm cook checkout-impl
24+
pnpm test
2525
```
2626

27-
#### 2. Run tests
27+
#### 2. Checkout the new implementation of `RecipeSearch`
2828

2929
```sh
30-
pnpm test
30+
pnpm cook checkout-impl
3131
```
3232

3333
#### 3. Analyze which tests are failing

0 commit comments

Comments
Β (0)