Skip to content

Commit

Permalink
docs: add note about detectChanges in the API documentation
Browse files Browse the repository at this point in the history
refs #33
  • Loading branch information
jnizet committed Jun 17, 2018
1 parent f020c41 commit 5f12b0e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions projects/ngx-speculoos/src/lib/component-tester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ export class ComponentTester<T> {
/**
* Creates a ComponentFixture for the given component type using the TestBed, and creates a ComponentTester
* wrapping (and delegating) to this fixture. If a fixture is passed, then delegates to this fixture directly.
*
* Note that no `detectChanges()` call is made by this constructor. It's up to the subclass constructor,
* or to the user of the created ComponentTester, to call `detectChanges()` at least once to trigger change
* detection. This is necessary because some component templates can only be evaluated once inputs
* have been set on the component instance.
*
* @param arg the type of the component to wrap, or a component fixture to wrap
*/
constructor(arg: Type<T> | ComponentFixture<T>) {
Expand Down

0 comments on commit 5f12b0e

Please sign in to comment.