Skip to content

Commit 6eb0627

Browse files
committed
docs: πŸ“ tidy up
1 parent 46f7e91 commit 6eb0627

8 files changed

+13
-12
lines changed

β€Ždocs/instructions/101-meal-planner.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pnpm test
5656

5757
#### 4. Implement tests.
5858

59-
#### 5. Checkout the implementation if you didn't do it already.
59+
#### 5. [optional] Checkout the implementation if you've opted for TDD option:
6060

6161
```sh
6262
pnpm cook checkout-impl

β€Ždocs/instructions/102-meal-planner-reactive.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pnpm test
7373

7474
#### 3. Implement tests.
7575

76-
#### 3. Checkout the implementation if you didn't do it already.
76+
#### 3. [optional] Checkout the implementation if you've opted for TDD option:.
7777

7878
```sh
7979
pnpm cook checkout-impl

β€Ždocs/instructions/201-meal-planner-indirect-output.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pnpm test
4242

4343
#### 4. Check that the fake repo contains the added recipe.
4444

45-
#### 5. Checkout the implementation if you didn't do it already.
45+
#### 5. [optional] Checkout the implementation if you've opted for TDD option:.
4646

4747
```sh
4848
pnpm cook checkout-impl
@@ -62,7 +62,7 @@ pnpm test
6262

6363
#### 4. Check that the spies were called properly.
6464

65-
#### 5. Checkout the implementation if you didn't do it already.
65+
#### 5. [optional] Checkout the implementation if you've opted for TDD option:.
6666

6767
```sh
6868
pnpm cook checkout-impl

β€Ždocs/instructions/202-meal-planner-indirect-input.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pnpm test
5353

5454
#### 5. Check that the spy was called properly.
5555

56-
#### 6. Checkout the implementation if you didn't do it already.
56+
#### 6. [optional] Checkout the implementation if you've opted for TDD option:.
5757

5858
```sh
5959
pnpm cook checkout-impl

β€Ždocs/instructions/303-recipe-search-shallow.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ TestBed.overrideComponent(RecipeSearch, {
5454

5555
#### 4. Query DOM and check child components properties. (Cf. [query DOM with `fixture.debugElement`](302-recipe-search-integration.md#-tip-query-dom-with-fixturedebugelement)] & [access element properties](#-tip-access-element-properties))
5656

57-
#### 5. Checkout the implementation if you didn't do it already.
57+
#### 5. [optional] Checkout the implementation if you've opted for TDD option:.
5858

5959
```sh
6060
pnpm cook checkout-impl

β€Ždocs/instructions/401-recipe-filter.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pnpm test
4141

4242
3. Check that `filterChange` have been triggered.
4343

44-
#### 3. Checkout the implementation if you didn't do it already.
44+
#### 3. [optional] Checkout the implementation if you've opted for TDD option:.
4545

4646
```sh
4747
pnpm cook checkout-impl

β€Ždocs/instructions/402-recipe-filter-interaction.mdβ€Ž

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,19 @@ pnpm test
4141

4242
#### 5. Query DOM and check child recipe preview components properties. (Cf. [query DOM with `fixture.debugElement`](./302-recipe-search-integration.md#-tip-query-dom-with-fixturedebugelement)] & [access element properties](./303-recipe-search-shallow.md#-tip-access-element-properties))
4343

44-
#### 6. Checkout the implementation if you didn't do it already.
44+
#### 6. [optional] Checkout the implementation if you've opted for TDD option:.
4545

4646
```sh
4747
pnpm cook checkout-impl
4848
```
4949

5050
## πŸ“– Appendices
5151

52-
### 🎁 Tip: Trigger events using `DebugElement.triggerEventHandler`
52+
### 🎁 Tip: Trigger events using `DebugElement#triggerEventHandler`
5353

54-
You can trigger both native and custom events using `DebugElement.triggerEventHandler`.
54+
You can trigger a custom event as an output using `DebugElement#triggerEventHandler` if a component was "shallowed".
5555

5656
```ts
57-
fixture.query(...).triggerEventHandler('myEventName', myEvent);
57+
const debugElement = fixture.query(...);
58+
debugElement.triggerEventHandler('myOutput', myValue);
5859
```

β€Ždocs/instructions/faq.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ TestBed.overrideComponent(MyThing, {
1616

1717
## Not getting the expected result
1818

19-
- [ ] Did you wait for change detection to be triggered and the component to be stable `fixture.whenStable()`?
19+
- [ ] Did you wait for change detection to be triggered and the component to be stable `fixture.whenStable()`? or did you use a retry-able assertion such as `await expect.element(...)...` or `await expect.poll(() => ...)`?
2020
- [ ] Did you `await` all functions that return a promise? (e.g. harnesses)
2121

2222
## How to stub a function that returns an observable?

0 commit comments

Comments
Β (0)