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:
@ -25,6 +25,7 @@ import {ComponentUrlMapper} from 'angular2/src/core/compiler/component_url_mappe
|
||||
import {StyleInliner} from 'angular2/src/core/compiler/style_inliner';
|
||||
import {CssProcessor} from 'angular2/src/core/compiler/css_processor';
|
||||
import {PrivateComponentLoader} from 'angular2/src/core/compiler/private_component_loader';
|
||||
import {TestabilityRegistry, Testability} from 'angular2/src/core/testability/testability';
|
||||
|
||||
import {If, For} from 'angular2/directives';
|
||||
import {App, setupReflectorForApp} from './app';
|
||||
@ -294,6 +295,18 @@ export function setupReflectorForAngular() {
|
||||
"annotations" : [new Decorator({selector: '[content]'})]
|
||||
});
|
||||
|
||||
reflector.registerType(TestabilityRegistry, {
|
||||
"factory": () => new TestabilityRegistry(),
|
||||
"parameters": [],
|
||||
"annotations": []
|
||||
});
|
||||
|
||||
reflector.registerType(Testability, {
|
||||
"factory": () => new Testability(),
|
||||
"parameters": [],
|
||||
"annotations": []
|
||||
});
|
||||
|
||||
reflector.registerType(StyleInliner, {
|
||||
"factory": (xhr, styleUrlResolver, urlResolver) =>
|
||||
new StyleInliner(xhr, styleUrlResolver, urlResolver),
|
||||
|
Reference in New Issue
Block a user