refactor(test/linker): fix typo in directive name
This commit is contained in:
parent
f664a9c4d5
commit
c6d6b75691
|
@ -834,14 +834,14 @@ export function main() {
|
||||||
inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async) => {
|
inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async) => {
|
||||||
tcb.overrideView(MyComp, new ViewMetadata({
|
tcb.overrideView(MyComp, new ViewMetadata({
|
||||||
template: '<div emitter listener></div>',
|
template: '<div emitter listener></div>',
|
||||||
directives: [DirectiveEmitingEvent, DirectiveListeningEvent]
|
directives: [DirectiveEmittingEvent, DirectiveListeningEvent]
|
||||||
}))
|
}))
|
||||||
|
|
||||||
.createAsync(MyComp)
|
.createAsync(MyComp)
|
||||||
.then((fixture) => {
|
.then((fixture) => {
|
||||||
|
|
||||||
var tc = fixture.debugElement.componentViewChildren[0];
|
var tc = fixture.debugElement.componentViewChildren[0];
|
||||||
var emitter = tc.inject(DirectiveEmitingEvent);
|
var emitter = tc.inject(DirectiveEmittingEvent);
|
||||||
var listener = tc.inject(DirectiveListeningEvent);
|
var listener = tc.inject(DirectiveListeningEvent);
|
||||||
|
|
||||||
expect(listener.msg).toEqual('');
|
expect(listener.msg).toEqual('');
|
||||||
|
@ -860,14 +860,14 @@ export function main() {
|
||||||
tcb.overrideView(
|
tcb.overrideView(
|
||||||
MyComp, new ViewMetadata({
|
MyComp, new ViewMetadata({
|
||||||
template: '<template emitter listener (event)="ctxProp=$event"></template>',
|
template: '<template emitter listener (event)="ctxProp=$event"></template>',
|
||||||
directives: [DirectiveEmitingEvent, DirectiveListeningEvent]
|
directives: [DirectiveEmittingEvent, DirectiveListeningEvent]
|
||||||
}))
|
}))
|
||||||
|
|
||||||
.createAsync(MyComp)
|
.createAsync(MyComp)
|
||||||
.then((fixture) => {
|
.then((fixture) => {
|
||||||
|
|
||||||
var tc = fixture.debugElement.componentViewChildren[0];
|
var tc = fixture.debugElement.componentViewChildren[0];
|
||||||
var emitter = tc.inject(DirectiveEmitingEvent);
|
var emitter = tc.inject(DirectiveEmittingEvent);
|
||||||
var myComp = tc.inject(MyComp);
|
var myComp = tc.inject(MyComp);
|
||||||
var listener = tc.inject(DirectiveListeningEvent);
|
var listener = tc.inject(DirectiveListeningEvent);
|
||||||
|
|
||||||
|
@ -1379,7 +1379,7 @@ export function main() {
|
||||||
tcb = tcb.overrideView(
|
tcb = tcb.overrideView(
|
||||||
MyComp, new ViewMetadata({
|
MyComp, new ViewMetadata({
|
||||||
template: `<span emitter listener (event)="throwError()" #local></span>`,
|
template: `<span emitter listener (event)="throwError()" #local></span>`,
|
||||||
directives: [DirectiveEmitingEvent, DirectiveListeningEvent]
|
directives: [DirectiveEmittingEvent, DirectiveListeningEvent]
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var fixture: ComponentFixture;
|
var fixture: ComponentFixture;
|
||||||
|
@ -1387,7 +1387,7 @@ export function main() {
|
||||||
tick();
|
tick();
|
||||||
|
|
||||||
var tc = fixture.debugElement.componentViewChildren[0];
|
var tc = fixture.debugElement.componentViewChildren[0];
|
||||||
tc.inject(DirectiveEmitingEvent).fireEvent("boom");
|
tc.inject(DirectiveEmittingEvent).fireEvent("boom");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
tick();
|
tick();
|
||||||
|
@ -2009,7 +2009,7 @@ class DoublePipe implements PipeTransform, OnDestroy {
|
||||||
|
|
||||||
@Directive({selector: '[emitter]', outputs: ['event']})
|
@Directive({selector: '[emitter]', outputs: ['event']})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
class DirectiveEmitingEvent {
|
class DirectiveEmittingEvent {
|
||||||
msg: string;
|
msg: string;
|
||||||
event: EventEmitter<any>;
|
event: EventEmitter<any>;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue