angular-docs-cn/modules/angular2/test/core/linker
Vikram Subramanian 769835e53e feat(testing): Use NgZone in TestComponentBuilder.
Instantiating the test component within an NgZone will let us track async tasks in event handlers and change detection.

We can also do auto change detection when triggering events through dispatchEvent and not have to do fixture.detectChange() manually in the test.

New API:
ComponentFixture.autoDetectChanges() - This puts the fixture in auto detect mode that automatically calls detectChanges when the microtask queue is empty (Similar to how change detection is triggered in an actual application).

ComponentFixture.isStable() - This returns a boolean whether the fixture is currently stable or has some async tasks that need to be completed.

ComponentFixture.whenStable() - This returns a promise that is resolved when the fixture is stable after all async tasks are complete.

Closes #8301
2016-04-28 22:37:37 +00:00
..
change_detection_integration_spec.ts feat(core): separate refs from vars. 2016-04-28 01:13:40 +00:00
dynamic_component_loader_spec.ts feat(testing): Use NgZone in TestComponentBuilder. 2016-04-28 22:37:37 +00:00
integration_dart_spec.dart feat(core): separate refs from vars. 2016-04-28 01:13:40 +00:00
integration_spec.ts feat(core): separate refs from vars. 2016-04-28 01:13:40 +00:00
projection_integration_spec.ts refactor(view_compiler): codegen DI and Queries 2016-04-13 14:43:48 -07:00
query_integration_spec.ts feat(core): separate refs from vars. 2016-04-28 01:13:40 +00:00
query_list_spec.ts revert(format): Revert "chore(format): update to latest formatter" 2016-04-12 09:41:01 -07:00
reflector_component_resolver_spec.ts refactor(core): introduce ComponentFactory. 2016-04-20 11:27:26 -07:00
regression_integration_spec.ts fix(core): properly evaluate expressions with conditional and boolean operators 2016-04-27 21:25:50 +00:00
view_injector_integration_spec.ts fix(compiler): properly implement pure pipes and change pipe syntax 2016-04-25 09:04:22 -07:00