feat(core): Add QueryList#forEach

This commit is contained in:
laco0416
2016-01-08 15:34:25 +09:00
committed by Matias Niemela
parent c1a0af514f
commit b634a25ae0
2 changed files with 12 additions and 0 deletions
@@ -50,6 +50,13 @@ export function main() {
expect(queryList.map((x) => x)).toEqual(['one', 'two']);
});
it('should support forEach', () => {
queryList.reset(['one', 'two']);
let join = '';
queryList.forEach((x) => join = join + x);
expect(join).toEqual('onetwo');
});
if (!IS_DART) {
it('should support filter', () => {
queryList.reset(['one', 'two']);