Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(integration): minor tests cleanup #3329

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 4 additions & 18 deletions modules/angular2/test/core/compiler/integration_spec.ts
Expand Up @@ -73,7 +73,6 @@ import {ElementRef} from 'angular2/src/core/compiler/element_ref';
import {TemplateRef} from 'angular2/src/core/compiler/template_ref';

import {DomRenderer} from 'angular2/src/render/dom/dom_renderer';
import {AppViewManager} from 'angular2/src/core/compiler/view_manager';

const ANCHOR_ELEMENT = CONST_EXPR(new OpaqueToken('AnchorElement'));

Expand Down Expand Up @@ -1479,7 +1478,7 @@ class MyService {
class SimpleImperativeViewComponent {
done;

constructor(self: ElementRef, viewManager: AppViewManager, renderer: DomRenderer) {
constructor(self: ElementRef, renderer: DomRenderer) {
var hostElement = renderer.getNativeElementSync(self);
DOM.appendChild(hostElement, el('hello imp view'));
}
Expand Down Expand Up @@ -1722,7 +1721,6 @@ var globalCounter = 0;
@Injectable()
class DirectiveListeningDomEventOther {
eventType: string;
counter: int;
constructor() { this.eventType = ''; }
onEvent(eventType: string) {
globalCounter++;
Expand Down Expand Up @@ -1856,15 +1854,6 @@ class DirectiveProvidingInjectable {
class DirectiveProvidingInjectableInView {
}

@Component({
selector: 'directive-providing-injectable',
hostInjector: [new Binding(InjectableService, {toValue: 'host'})],
viewInjector: [new Binding(InjectableService, {toValue: 'view'})]
})
@View({template: ''})
@Injectable()
class DirectiveProvidingInjectableInHostAndView {
}


@Component({selector: 'directive-consuming-injectable'})
Expand Down Expand Up @@ -1989,22 +1978,19 @@ class ComponentWithoutView {

@Directive({selector: '[no-duplicate]'})
class DuplicateDir {
constructor(renderer: DomRenderer, private elRef: ElementRef) {
constructor(elRef: ElementRef) {
DOM.setText(elRef.nativeElement, DOM.getText(elRef.nativeElement) + 'noduplicate');
}
}

@Directive({selector: '[no-duplicate]'})
class OtherDuplicateDir {
constructor(renderer: DomRenderer, private elRef: ElementRef) {
constructor(elRef: ElementRef) {
DOM.setText(elRef.nativeElement, DOM.getText(elRef.nativeElement) + 'othernoduplicate');
}
}

@Directive({selector: 'directive-throwing-error'})
class DirectiveThrowingAnError {
constructor() {
throw new BaseException("BOOM");
;
}
constructor() { throw new BaseException("BOOM"); }
}