本文整理汇总了TypeScript中angular2/src/core/testability/testability.TestabilityRegistry类的典型用法代码示例。如果您正苦于以下问题:TypeScript TestabilityRegistry类的具体用法?TypeScript TestabilityRegistry怎么用?TypeScript TestabilityRegistry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TestabilityRegistry类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: Error
window.angular2.getTestability = function(elem): PublicTestability {
var testability = registry.findTestabilityInTree(elem);
if (testability == null) {
throw new Error('Could not find testability for element.');
}
return new PublicTestability(testability);
};
示例2: Error
global.getAngularTestability = function(elem: Element,
findInAncestors: boolean = true): PublicTestability {
var testability = registry.findTestabilityInTree(elem, findInAncestors);
if (testability == null) {
throw new Error('Could not find testability for element.');
}
return new PublicTestability(testability);
};
示例3: function
global.getAllAngularTestabilities = function(): PublicTestability[] {
var testabilities = registry.getAllTestabilities();
return testabilities.map((testability) => { return new PublicTestability(testability); });
};