From 0499eeb231bfc45b9682cd81cedac9a67e449d46 Mon Sep 17 00:00:00 2001 From: Marc Laval Date: Tue, 10 Feb 2015 07:39:29 +0100 Subject: [PATCH] refactor(facade): remove dependency to rtts_assert Closes #593 --- modules/angular2/src/facade/lang.es6 | 2 -- modules/angular2/src/test_lib/test_lib.es6 | 1 + modules/angular2/test/core/compiler/element_injector_spec.js | 4 ++-- .../test/core/compiler/shadow_dom/content_tag_spec.js | 4 ++-- .../angular2/test/core/compiler/shadow_dom/light_dom_spec.js | 4 ++-- modules/angular2/test/core/compiler/view_pool_spec.js | 4 ++-- modules/angular2/test/core/compiler/view_spec.js | 4 ++-- modules/angular2/test/core/compiler/viewport_spec.js | 4 ++-- modules/angular2/test/test_lib/test_lib_spec.js | 4 ++-- 9 files changed, 15 insertions(+), 16 deletions(-) diff --git a/modules/angular2/src/facade/lang.es6 b/modules/angular2/src/facade/lang.es6 index f0c672f801..f7c8201f41 100644 --- a/modules/angular2/src/facade/lang.es6 +++ b/modules/angular2/src/facade/lang.es6 @@ -1,5 +1,3 @@ -export {proxy} from 'rtts_assert/rtts_assert'; - var _global = typeof window === 'undefined' ? global : window; export {_global as global}; diff --git a/modules/angular2/src/test_lib/test_lib.es6 b/modules/angular2/src/test_lib/test_lib.es6 index 6f38e1c651..25c6a835e9 100644 --- a/modules/angular2/src/test_lib/test_lib.es6 +++ b/modules/angular2/src/test_lib/test_lib.es6 @@ -1,5 +1,6 @@ import {DOM} from 'angular2/src/facade/dom'; +export {proxy} from 'rtts_assert/rtts_assert'; export var describe = window.describe; export var xdescribe = window.xdescribe; export var ddescribe = window.ddescribe; diff --git a/modules/angular2/test/core/compiler/element_injector_spec.js b/modules/angular2/test/core/compiler/element_injector_spec.js index 8b39532e11..0b5077500f 100644 --- a/modules/angular2/test/core/compiler/element_injector_spec.js +++ b/modules/angular2/test/core/compiler/element_injector_spec.js @@ -1,5 +1,5 @@ -import {describe, ddescribe, it, iit, xit, xdescribe, expect, beforeEach, SpyObject} from 'angular2/test_lib'; -import {isBlank, isPresent, FIELD, IMPLEMENTS, proxy} from 'angular2/src/facade/lang'; +import {describe, ddescribe, it, iit, xit, xdescribe, expect, beforeEach, SpyObject, proxy} from 'angular2/test_lib'; +import {isBlank, isPresent, FIELD, IMPLEMENTS} from 'angular2/src/facade/lang'; import {ListWrapper, MapWrapper, List} from 'angular2/src/facade/collection'; import {ProtoElementInjector, PreBuiltObjects, DirectiveBinding} from 'angular2/src/core/compiler/element_injector'; import {Parent, Ancestor} from 'angular2/src/core/annotations/visibility'; diff --git a/modules/angular2/test/core/compiler/shadow_dom/content_tag_spec.js b/modules/angular2/test/core/compiler/shadow_dom/content_tag_spec.js index c2eb2a4a89..5a81698d7b 100644 --- a/modules/angular2/test/core/compiler/shadow_dom/content_tag_spec.js +++ b/modules/angular2/test/core/compiler/shadow_dom/content_tag_spec.js @@ -1,5 +1,5 @@ -import {describe, beforeEach, it, expect, ddescribe, iit, SpyObject, el} from 'angular2/test_lib'; -import {proxy, IMPLEMENTS} from 'angular2/src/facade/lang'; +import {describe, beforeEach, it, expect, ddescribe, iit, SpyObject, el, proxy} from 'angular2/test_lib'; +import {IMPLEMENTS} from 'angular2/src/facade/lang'; import {DOM} from 'angular2/src/facade/dom'; import {Content} from 'angular2/src/core/compiler/shadow_dom_emulation/content_tag'; import {NgElement} from 'angular2/src/core/dom/element'; diff --git a/modules/angular2/test/core/compiler/shadow_dom/light_dom_spec.js b/modules/angular2/test/core/compiler/shadow_dom/light_dom_spec.js index be56a063da..c07f46080e 100644 --- a/modules/angular2/test/core/compiler/shadow_dom/light_dom_spec.js +++ b/modules/angular2/test/core/compiler/shadow_dom/light_dom_spec.js @@ -1,5 +1,5 @@ -import {describe, beforeEach, it, expect, ddescribe, iit, SpyObject, el} from 'angular2/test_lib'; -import {proxy, IMPLEMENTS, isBlank} from 'angular2/src/facade/lang'; +import {describe, beforeEach, it, expect, ddescribe, iit, SpyObject, el, proxy} from 'angular2/test_lib'; +import {IMPLEMENTS, isBlank} from 'angular2/src/facade/lang'; import {ListWrapper, MapWrapper} from 'angular2/src/facade/collection'; import {DOM} from 'angular2/src/facade/dom'; import {Content} from 'angular2/src/core/compiler/shadow_dom_emulation/content_tag'; diff --git a/modules/angular2/test/core/compiler/view_pool_spec.js b/modules/angular2/test/core/compiler/view_pool_spec.js index e1e7065259..3146233244 100644 --- a/modules/angular2/test/core/compiler/view_pool_spec.js +++ b/modules/angular2/test/core/compiler/view_pool_spec.js @@ -1,8 +1,8 @@ -import {describe, xit, it, expect, beforeEach, ddescribe, iit, el} from 'angular2/test_lib'; +import {describe, xit, it, expect, beforeEach, ddescribe, iit, el, proxy} from 'angular2/test_lib'; import {View} from 'angular2/src/core/compiler/view'; import {ViewPool} from 'angular2/src/core/compiler/view_pool'; -import {proxy, IMPLEMENTS} from 'angular2/src/facade/lang'; +import {IMPLEMENTS} from 'angular2/src/facade/lang'; @proxy @IMPLEMENTS(View) diff --git a/modules/angular2/test/core/compiler/view_spec.js b/modules/angular2/test/core/compiler/view_spec.js index 5ffae5c9a4..55d8edefd0 100644 --- a/modules/angular2/test/core/compiler/view_spec.js +++ b/modules/angular2/test/core/compiler/view_spec.js @@ -1,4 +1,4 @@ -import {describe, xit, it, expect, beforeEach, ddescribe, iit, el} from 'angular2/test_lib'; +import {describe, xit, it, expect, beforeEach, ddescribe, iit, el, proxy} from 'angular2/test_lib'; import {ProtoView, ElementPropertyMemento, DirectivePropertyMemento} from 'angular2/src/core/compiler/view'; import {ProtoElementInjector, ElementInjector, DirectiveBinding} from 'angular2/src/core/compiler/element_injector'; import {EmulatedShadowDomStrategy, NativeShadowDomStrategy} from 'angular2/src/core/compiler/shadow_dom_strategy'; @@ -10,7 +10,7 @@ import {TemplateConfig} from 'angular2/src/core/annotations/template_config'; import {EventEmitter} from 'angular2/src/core/annotations/events'; import {List, MapWrapper} from 'angular2/src/facade/collection'; import {DOM, Element} from 'angular2/src/facade/dom'; -import {int, proxy, IMPLEMENTS} from 'angular2/src/facade/lang'; +import {int, IMPLEMENTS} from 'angular2/src/facade/lang'; import {Injector} from 'angular2/di'; import {View} from 'angular2/src/core/compiler/view'; import {ViewPort} from 'angular2/src/core/compiler/viewport'; diff --git a/modules/angular2/test/core/compiler/viewport_spec.js b/modules/angular2/test/core/compiler/viewport_spec.js index 6f8c448410..9e70c1d538 100644 --- a/modules/angular2/test/core/compiler/viewport_spec.js +++ b/modules/angular2/test/core/compiler/viewport_spec.js @@ -1,7 +1,7 @@ -import {describe, xit, it, expect, beforeEach, ddescribe, iit, el} from 'angular2/test_lib'; +import {describe, xit, it, expect, beforeEach, ddescribe, iit, el, proxy} from 'angular2/test_lib'; import {View, ProtoView} from 'angular2/src/core/compiler/view'; import {ViewPort} from 'angular2/src/core/compiler/viewport'; -import {proxy, IMPLEMENTS} from 'angular2/src/facade/lang'; +import {IMPLEMENTS} from 'angular2/src/facade/lang'; import {DOM, Node} from 'angular2/src/facade/dom'; import {ListWrapper, MapWrapper} from 'angular2/src/facade/collection'; import {Injector} from 'angular2/di'; diff --git a/modules/angular2/test/test_lib/test_lib_spec.js b/modules/angular2/test/test_lib/test_lib_spec.js index dbdbd97334..d87de7a325 100644 --- a/modules/angular2/test/test_lib/test_lib_spec.js +++ b/modules/angular2/test/test_lib/test_lib_spec.js @@ -1,7 +1,7 @@ -import {describe, it, iit, ddescribe, expect, tick, async, SpyObject, beforeEach} from 'angular2/test_lib'; +import {describe, it, iit, ddescribe, expect, tick, async, SpyObject, beforeEach, proxy} from 'angular2/test_lib'; import {MapWrapper, ListWrapper} from 'angular2/src/facade/collection'; import {PromiseWrapper} from 'angular2/src/facade/async'; -import {IMPLEMENTS, proxy} from 'angular2/src/facade/lang'; +import {IMPLEMENTS} from 'angular2/src/facade/lang'; class TestObj { prop;