
committed by
Miško Hevery

parent
4415855683
commit
e916836261
@ -8,7 +8,7 @@ class PublicTestability {
|
||||
|
||||
whenStable(callback: Function) { this._testability.whenStable(callback); }
|
||||
|
||||
findBindings(using: any, binding: string, exactMatch: boolean): List<any> {
|
||||
findBindings(using: any, binding: string, exactMatch: boolean): any[] {
|
||||
return this._testability.findBindings(using, binding, exactMatch);
|
||||
}
|
||||
}
|
||||
@ -24,7 +24,7 @@ export class GetTestability {
|
||||
}
|
||||
return new PublicTestability(testability);
|
||||
};
|
||||
global.getAllAngularTestabilities = function(): List<PublicTestability> {
|
||||
global.getAllAngularTestabilities = function(): PublicTestability[] {
|
||||
var testabilities = registry.getAllTestabilities();
|
||||
return testabilities.map((testability) => { return new PublicTestability(testability); });
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {Injectable} from 'angular2/di';
|
||||
import {DOM} from 'angular2/src/core/dom/dom_adapter';
|
||||
import {Map, MapWrapper, List, ListWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {Map, MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {StringWrapper, isBlank, BaseException} from 'angular2/src/core/facade/lang';
|
||||
import * as getTestabilityModule from './get_testability';
|
||||
import {NgZone} from '../zone/ng_zone';
|
||||
@ -15,7 +15,7 @@ import {PromiseWrapper} from 'angular2/src/core/facade/async';
|
||||
@Injectable()
|
||||
export class Testability {
|
||||
_pendingCount: number = 0;
|
||||
_callbacks: List<Function> = [];
|
||||
_callbacks: Function[] = [];
|
||||
_isAngularEventPending: boolean = false;
|
||||
|
||||
constructor(public _ngZone: NgZone) { this._watchAngularEvents(_ngZone); }
|
||||
@ -66,7 +66,7 @@ export class Testability {
|
||||
// check for stability.
|
||||
isAngularEventPending(): boolean { return this._isAngularEventPending; }
|
||||
|
||||
findBindings(using: any, binding: string, exactMatch: boolean): List<any> {
|
||||
findBindings(using: any, binding: string, exactMatch: boolean): any[] {
|
||||
// TODO(juliemr): implement.
|
||||
return [];
|
||||
}
|
||||
@ -82,7 +82,7 @@ export class TestabilityRegistry {
|
||||
this._applications.set(token, testability);
|
||||
}
|
||||
|
||||
getAllTestabilities(): List<Testability> { return MapWrapper.values(this._applications); }
|
||||
getAllTestabilities(): Testability[] { return MapWrapper.values(this._applications); }
|
||||
|
||||
findTestabilityInTree(elem: Node, findInAncestors: boolean = true): Testability {
|
||||
if (elem == null) {
|
||||
|
Reference in New Issue
Block a user