build: reformat repo to new clang@1.4.0 (#36613)

PR Close #36613
This commit is contained in:
Joey Perrott
2020-04-13 16:40:21 -07:00
committed by atscott
parent 5e80e7e216
commit 698b0288be
1160 changed files with 31667 additions and 24000 deletions

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {Observable, fromEvent, fromEventPattern} from 'rxjs';
import {fromEvent, fromEventPattern, Observable} from 'rxjs';
import {isBrowser} from '../../lib/common/utils';
import {ifEnvSupports} from '../test-util';
@ -24,11 +24,15 @@ describe('Observable.fromEvent', () => {
const triggerZone: Zone = Zone.current.fork({name: 'Trigger Zone'});
let observable1: Observable<any>;
beforeEach(() => { log = []; });
beforeEach(() => {
log = [];
});
it('fromEvent EventTarget func callback should run in the correct zone',
ifEnvSupports(isEventTarget, () => {
observable1 = constructorZone1.run(() => { return fromEvent(document, 'click'); });
observable1 = constructorZone1.run(() => {
return fromEvent(document, 'click');
});
const clickEvent = document.createEvent('Event');
clickEvent.initEvent('click', true, true);
@ -39,14 +43,18 @@ describe('Observable.fromEvent', () => {
expect(Zone.current.name).toEqual(subscriptionZone.name);
log.push(result);
},
() => { fail('should not call error'); },
() => {
fail('should not call error');
},
() => {
expect(Zone.current.name).toEqual(subscriptionZone.name);
log.push('completed');
});
});
triggerZone.run(() => { document.dispatchEvent(clickEvent); });
triggerZone.run(() => {
document.dispatchEvent(clickEvent);
});
expect(log).toEqual([clickEvent]);
}));
@ -79,7 +87,9 @@ describe('Observable.fromEvent', () => {
expect(Zone.current.name).toEqual(subscriptionZone.name);
log.push(result);
},
() => { fail('should not call error'); },
() => {
fail('should not call error');
},
() => {
expect(Zone.current.name).toEqual(subscriptionZone.name);
log.push('completed');