@@ -10,6 +10,7 @@ import {
|
||||
fakeAsync,
|
||||
tick
|
||||
} from 'angular2/testing_internal';
|
||||
import {IS_DART} from '../../platform';
|
||||
|
||||
import {MapWrapper, ListWrapper, iterateListLike} from 'angular2/src/core/facade/collection';
|
||||
import {StringWrapper} from 'angular2/src/core/facade/lang';
|
||||
@@ -46,6 +47,28 @@ export function main() {
|
||||
expect(queryList.map((x) => x)).toEqual(['one', 'two']);
|
||||
});
|
||||
|
||||
if (!IS_DART) {
|
||||
it('should support filter', () => {
|
||||
queryList.reset(['one', 'two']);
|
||||
expect((<any>queryList).filter((x) => x == "one")).toEqual(['one']);
|
||||
});
|
||||
|
||||
it('should support reduce', () => {
|
||||
queryList.reset(["one", "two"]);
|
||||
expect((<any>queryList).reduce((a, x) => a + x, "start:")).toEqual("start:onetwo");
|
||||
});
|
||||
|
||||
it('should support toArray', () => {
|
||||
queryList.reset(["one", "two"]);
|
||||
expect((<any>queryList).reduce((a, x) => a + x, "start:")).toEqual("start:onetwo");
|
||||
});
|
||||
|
||||
it('should support toArray', () => {
|
||||
queryList.reset(["one", "two"]);
|
||||
expect((<any>queryList).toArray()).toEqual(["one", "two"]);
|
||||
});
|
||||
}
|
||||
|
||||
it('should support toString', () => {
|
||||
queryList.reset(['one', 'two']);
|
||||
var listString = queryList.toString();
|
||||
|
||||
Reference in New Issue
Block a user