feat(testability): add an initial scaffold for the testability api
Make each application component register itself onto the testability API and exports the API onto the window object.
This commit is contained in:
@@ -21,6 +21,7 @@ import {StyleInliner} from 'angular2/src/core/compiler/style_inliner';
|
||||
import {CssProcessor} from 'angular2/src/core/compiler/css_processor';
|
||||
import {EventManager} from 'angular2/src/core/events/event_manager';
|
||||
import {PrivateComponentLoader} from 'angular2/src/core/compiler/private_component_loader';
|
||||
import {TestabilityRegistry, Testability} from 'angular2/src/core/testability/testability';
|
||||
|
||||
import {reflector} from 'angular2/src/reflection/reflection';
|
||||
|
||||
@@ -185,6 +186,18 @@ function setup() {
|
||||
"annotations": []
|
||||
});
|
||||
|
||||
reflector.registerType(TestabilityRegistry, {
|
||||
"factory": () => new TestabilityRegistry(),
|
||||
"parameters": [],
|
||||
"annotations": []
|
||||
});
|
||||
|
||||
reflector.registerType(Testability, {
|
||||
"factory": () => new Testability(),
|
||||
"parameters": [],
|
||||
"annotations": []
|
||||
});
|
||||
|
||||
reflector.registerGetters({
|
||||
"greeting": (a) => a.greeting
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user