@@ -10,6 +10,7 @@ import {
1010 fakeAsync ,
1111 tick
1212} from 'angular2/testing_internal' ;
13+ import { IS_DART } from '../../platform' ;
1314
1415import { MapWrapper , ListWrapper , iterateListLike } from 'angular2/src/core/facade/collection' ;
1516import { StringWrapper } from 'angular2/src/core/facade/lang' ;
@@ -46,6 +47,28 @@ export function main() {
4647 expect ( queryList . map ( ( x ) => x ) ) . toEqual ( [ 'one' , 'two' ] ) ;
4748 } ) ;
4849
50+ if ( ! IS_DART ) {
51+ it ( 'should support filter' , ( ) => {
52+ queryList . reset ( [ 'one' , 'two' ] ) ;
53+ expect ( ( < any > queryList ) . filter ( ( x ) => x == "one" ) ) . toEqual ( [ 'one' ] ) ;
54+ } ) ;
55+
56+ it ( 'should support reduce' , ( ) => {
57+ queryList . reset ( [ "one" , "two" ] ) ;
58+ expect ( ( < any > queryList ) . reduce ( ( a , x ) => a + x , "start:" ) ) . toEqual ( "start:onetwo" ) ;
59+ } ) ;
60+
61+ it ( 'should support toArray' , ( ) => {
62+ queryList . reset ( [ "one" , "two" ] ) ;
63+ expect ( ( < any > queryList ) . reduce ( ( a , x ) => a + x , "start:" ) ) . toEqual ( "start:onetwo" ) ;
64+ } ) ;
65+
66+ it ( 'should support toArray' , ( ) => {
67+ queryList . reset ( [ "one" , "two" ] ) ;
68+ expect ( ( < any > queryList ) . toArray ( ) ) . toEqual ( [ "one" , "two" ] ) ;
69+ } ) ;
70+ }
71+
4972 it ( 'should support toString' , ( ) => {
5073 queryList . reset ( [ 'one' , 'two' ] ) ;
5174 var listString = queryList . toString ( ) ;
0 commit comments