fix(testability): throw if no testability available
this implements the same behavior for dart that is already implemented in the typescript version
This commit is contained in:
parent
218b037d98
commit
08dbe87819
|
@ -93,6 +93,9 @@ class GetTestability {
|
|||
static addToWindow(TestabilityRegistry registry) {
|
||||
js.context['getAngularTestability'] = _jsify((Element elem) {
|
||||
Testability testability = registry.findTestabilityInTree(elem);
|
||||
if (testability == null) {
|
||||
throw 'Could not find testability for element.';
|
||||
}
|
||||
return _jsify(new PublicTestability(testability));
|
||||
});
|
||||
js.context['getAllAngularTestabilities'] = _jsify(() {
|
||||
|
|
Loading…
Reference in New Issue