Skip to content

Commit 050b14b

Browse files
guidettjleonsenft
authored andcommitted
docs: fix incorrect getHarnesses() method to getAllHarnesses and broken link
1 parent 098553b commit 050b14b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

adev/src/content/guide/testing/using-component-harnesses.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Additional testing environments require custom bindings. See the [adding harness
2525

2626
### Using the loader from `TestbedHarnessEnvironment` for unit tests
2727

28-
For unit tests you can create a harness loader from [TestbedHarnessEnvironment](/api/cdk/testing/TestbedHarnessEnvironment). This environment uses a [component fixture](api/core/testing/ComponentFixture) created by Angular's `TestBed`.
28+
For unit tests you can create a harness loader from [TestbedHarnessEnvironment](/api/cdk/testing/testbed/TestbedHarnessEnvironment). This environment uses a [component fixture](api/core/testing/ComponentFixture) created by Angular's `TestBed`.
2929

3030
To create a harness loader rooted at the fixture's root element, use the `loader()` method:
3131

@@ -68,7 +68,7 @@ To get `ComponentHarness` for the first instance of the element, use the `getHar
6868
const myComponentHarness = await loader.getHarness(MyComponent);
6969

7070
// Get harnesses for all instances of the element
71-
const myComponentHarnesses = await loader.getHarnesses(MyComponent);
71+
const myComponentHarnesses = await loader.getAllHarnesses(MyComponent);
7272
```
7373

7474
In addition to `getHarness` and `getAllHarnesses`, `HarnessLoader` has several other useful methods for querying for harnesses:

0 commit comments

Comments
 (0)