diff --git a/modules/angular2/src/debug/debug_element.ts b/modules/angular2/src/debug/debug_element.ts index 47dac8ae10..02fdde7fa4 100644 --- a/modules/angular2/src/debug/debug_element.ts +++ b/modules/angular2/src/debug/debug_element.ts @@ -87,6 +87,8 @@ export class DebugElement { return this._elementInjector.get(type); } + getLocal(name: string): any { return this._parentView.locals.get(name); } + /** * Return the first descendant TestElememt matching the given predicate * and scope. diff --git a/modules/angular2/test/core/compiler/integration_spec.ts b/modules/angular2/test/core/compiler/integration_spec.ts index 0c3643a459..2adab993f1 100644 --- a/modules/angular2/test/core/compiler/integration_spec.ts +++ b/modules/angular2/test/core/compiler/integration_spec.ts @@ -14,12 +14,11 @@ import { it, xit, containsRegexp, - stringifyElement + stringifyElement, + TestComponentBuilder } from 'angular2/test_lib'; -import {TestBed} from 'angular2/src/test_lib/test_bed'; - import {DOM} from 'angular2/src/dom/dom_adapter'; import { Type, @@ -76,58 +75,55 @@ const ANCHOR_ELEMENT = CONST_EXPR(new OpaqueToken('AnchorElement')); export function main() { describe('integration tests', function() { - var ctx; beforeEachBindings(() => [bind(ANCHOR_ELEMENT).toValue(el('
'))]); - beforeEach(() => { ctx = new MyComp(); }); - - describe('react to record changes', function() { it('should consume text node changes', - inject([TestBed, AsyncTestCompleter], (tb: TestBed, async) => { - tb.overrideView(MyComp, new viewAnn.View({template: '