chore: clang-reformat
This commit is contained in:
@ -294,7 +294,8 @@ export function main() {
|
||||
var childTestEls = fixture.debugElement.queryAll(By.css('child-comp'));
|
||||
|
||||
expect(childTestEls.length).toBe(1);
|
||||
expect(getDOM().hasClass(childTestEls[0].nativeElement, 'child-comp-class')).toBe(true);
|
||||
expect(getDOM().hasClass(childTestEls[0].nativeElement, 'child-comp-class'))
|
||||
.toBe(true);
|
||||
|
||||
async.done();
|
||||
});
|
||||
|
@ -1,14 +1,4 @@
|
||||
import {
|
||||
beforeEach,
|
||||
ddescribe,
|
||||
describe,
|
||||
expect,
|
||||
iit,
|
||||
inject,
|
||||
it,
|
||||
xdescribe,
|
||||
xit
|
||||
} from '../testing';
|
||||
import {beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '../testing';
|
||||
|
||||
import {assertionsEnabled, IS_DART} from '../../router/src/facade/lang';
|
||||
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
xdescribe,
|
||||
xit,
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import { Log } from '@angular/core/testing';
|
||||
import {Log} from '@angular/core/testing';
|
||||
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||
import {TestComponentBuilder} from '@angular/compiler/testing';
|
||||
|
||||
|
@ -23,4 +23,6 @@ export function main() {
|
||||
});
|
||||
}
|
||||
|
||||
function identity(a) { return a; }
|
||||
function identity(a) {
|
||||
return a;
|
||||
}
|
||||
|
@ -10,12 +10,7 @@ import {
|
||||
it,
|
||||
xit,
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import {
|
||||
containsRegexp,
|
||||
fakeAsync,
|
||||
tick,
|
||||
clearPendingTimers
|
||||
} from '@angular/core/testing';
|
||||
import {containsRegexp, fakeAsync, tick, clearPendingTimers} from '@angular/core/testing';
|
||||
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
|
||||
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||
@ -163,14 +158,14 @@ function declareTests(isJit: boolean) {
|
||||
.then((fixture) => {
|
||||
fixture.debugElement.componentInstance.ctxProp = 'Initial aria label';
|
||||
fixture.detectChanges();
|
||||
expect(
|
||||
getDOM().getAttribute(fixture.debugElement.children[0].nativeElement, 'aria-label'))
|
||||
expect(getDOM().getAttribute(fixture.debugElement.children[0].nativeElement,
|
||||
'aria-label'))
|
||||
.toEqual('Initial aria label');
|
||||
|
||||
fixture.debugElement.componentInstance.ctxProp = 'Changed aria label';
|
||||
fixture.detectChanges();
|
||||
expect(
|
||||
getDOM().getAttribute(fixture.debugElement.children[0].nativeElement, 'aria-label'))
|
||||
expect(getDOM().getAttribute(fixture.debugElement.children[0].nativeElement,
|
||||
'aria-label'))
|
||||
.toEqual('Changed aria label');
|
||||
|
||||
async.done();
|
||||
@ -187,12 +182,14 @@ function declareTests(isJit: boolean) {
|
||||
|
||||
fixture.debugElement.componentInstance.ctxProp = 'bar';
|
||||
fixture.detectChanges();
|
||||
expect(getDOM().getAttribute(fixture.debugElement.children[0].nativeElement, 'foo'))
|
||||
expect(
|
||||
getDOM().getAttribute(fixture.debugElement.children[0].nativeElement, 'foo'))
|
||||
.toEqual('bar');
|
||||
|
||||
fixture.debugElement.componentInstance.ctxProp = null;
|
||||
fixture.detectChanges();
|
||||
expect(getDOM().hasAttribute(fixture.debugElement.children[0].nativeElement, 'foo'))
|
||||
expect(
|
||||
getDOM().hasAttribute(fixture.debugElement.children[0].nativeElement, 'foo'))
|
||||
.toBeFalsy();
|
||||
|
||||
async.done();
|
||||
@ -1087,7 +1084,8 @@ function declareTests(isJit: boolean) {
|
||||
.then((fixture) => {
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(getDOM().getAttribute(fixture.debugElement.children[0].nativeElement, "role"))
|
||||
expect(
|
||||
getDOM().getAttribute(fixture.debugElement.children[0].nativeElement, "role"))
|
||||
.toEqual("button");
|
||||
|
||||
async.done();
|
||||
@ -1136,9 +1134,9 @@ function declareTests(isJit: boolean) {
|
||||
var dispatchedEvent = getDOM().createMouseEvent('click');
|
||||
var dispatchedEvent2 = getDOM().createMouseEvent('click');
|
||||
getDOM().dispatchEvent(fixture.debugElement.children[0].nativeElement,
|
||||
dispatchedEvent);
|
||||
dispatchedEvent);
|
||||
getDOM().dispatchEvent(fixture.debugElement.children[1].nativeElement,
|
||||
dispatchedEvent2);
|
||||
dispatchedEvent2);
|
||||
expect(getDOM().isPrevented(dispatchedEvent)).toBe(true);
|
||||
expect(getDOM().isPrevented(dispatchedEvent2)).toBe(false);
|
||||
expect(getDOM().getChecked(fixture.debugElement.children[0].nativeElement))
|
||||
@ -1379,7 +1377,8 @@ function declareTests(isJit: boolean) {
|
||||
}))
|
||||
.createAsync(MyComp)
|
||||
.then((fixture) => {
|
||||
expect(getDOM().querySelectorAll(fixture.debugElement.nativeElement, 'script').length)
|
||||
expect(
|
||||
getDOM().querySelectorAll(fixture.debugElement.nativeElement, 'script').length)
|
||||
.toEqual(0);
|
||||
async.done();
|
||||
});
|
||||
@ -2531,7 +2530,8 @@ class DuplicateDir {
|
||||
@Directive({selector: '[no-duplicate]'})
|
||||
class OtherDuplicateDir {
|
||||
constructor(elRef: ElementRef) {
|
||||
getDOM().setText(elRef.nativeElement, getDOM().getText(elRef.nativeElement) + 'othernoduplicate');
|
||||
getDOM().setText(elRef.nativeElement,
|
||||
getDOM().getText(elRef.nativeElement) + 'othernoduplicate');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -269,18 +269,18 @@ export function main() {
|
||||
inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async) => {
|
||||
var template = '<needs-tpl><template><div>light</div></template></needs-tpl>';
|
||||
tcb.overrideTemplate(MyComp0, template)
|
||||
.createAsync(MyComp0)
|
||||
.then((view) => {
|
||||
view.detectChanges();
|
||||
var needsTpl: NeedsTpl = view.debugElement.children[0].inject(NeedsTpl);
|
||||
.createAsync(MyComp0)
|
||||
.then((view) => {
|
||||
view.detectChanges();
|
||||
var needsTpl: NeedsTpl = view.debugElement.children[0].inject(NeedsTpl);
|
||||
|
||||
expect(needsTpl.vc.createEmbeddedView(needsTpl.query.first).rootNodes[0])
|
||||
.toHaveText('light');
|
||||
expect(needsTpl.vc.createEmbeddedView(needsTpl.viewQuery.first).rootNodes[0])
|
||||
.toHaveText('shadow');
|
||||
expect(needsTpl.vc.createEmbeddedView(needsTpl.query.first).rootNodes[0])
|
||||
.toHaveText('light');
|
||||
expect(needsTpl.vc.createEmbeddedView(needsTpl.viewQuery.first).rootNodes[0])
|
||||
.toHaveText('shadow');
|
||||
|
||||
async.done();
|
||||
});
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
|
||||
it('should find named TemplateRefs',
|
||||
@ -866,7 +866,9 @@ class NeedsViewChild implements AfterViewInit,
|
||||
|
||||
ngAfterViewInit() { this.logs.push(["init", isPresent(this.child) ? this.child.text : null]); }
|
||||
|
||||
ngAfterViewChecked() { this.logs.push(["check", isPresent(this.child) ? this.child.text : null]); }
|
||||
ngAfterViewChecked() {
|
||||
this.logs.push(["check", isPresent(this.child) ? this.child.text : null]);
|
||||
}
|
||||
}
|
||||
|
||||
@Directive({selector: '[dir]'})
|
||||
|
@ -10,13 +10,7 @@ import {
|
||||
beforeEachProviders,
|
||||
inject,
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import {
|
||||
fakeAsync,
|
||||
flushMicrotasks,
|
||||
Log,
|
||||
tick,
|
||||
containsRegexp
|
||||
} from '@angular/core/testing';
|
||||
import {fakeAsync, flushMicrotasks, Log, tick, containsRegexp} from '@angular/core/testing';
|
||||
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
|
||||
import {isBlank} from '../../src/facade/lang';
|
||||
import {
|
||||
|
@ -19,9 +19,11 @@ import {
|
||||
HasGetterAndSetterDecorators
|
||||
} from './reflector_common';
|
||||
import {IS_DART} from '../../src/facade/lang';
|
||||
import {browserDetection} from '@angular/platform-browser/testing'
|
||||
import {
|
||||
browserDetection
|
||||
} from '@angular/platform-browser/testing'
|
||||
|
||||
class AType {
|
||||
class AType {
|
||||
value;
|
||||
|
||||
constructor(value) { this.value = value; }
|
||||
|
@ -1,13 +1,4 @@
|
||||
import {
|
||||
describe,
|
||||
it,
|
||||
iit,
|
||||
ddescribe,
|
||||
expect,
|
||||
tick,
|
||||
beforeEach,
|
||||
containsRegexp
|
||||
} from '../testing';
|
||||
import {describe, it, iit, ddescribe, expect, tick, beforeEach, containsRegexp} from '../testing';
|
||||
import {SpyObject} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {MapWrapper} from '../../platform-browser/src/facade/collection';
|
||||
|
@ -9,9 +9,7 @@ import {
|
||||
xdescribe,
|
||||
xit,
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import {
|
||||
Log
|
||||
} from '@angular/core/testing';
|
||||
import {Log} from '@angular/core/testing';
|
||||
|
||||
import {
|
||||
PromiseCompleter,
|
||||
|
Reference in New Issue
Block a user