refactor(dart/transform): Test directive_linker as a unit
Formerly, it was tested only as a piece of the transformer pipeline. Add its own directory and test the linker on its own.
This commit is contained in:
@@ -96,17 +96,6 @@ void allTests() {
|
||||
outputs: {
|
||||
'a|web/bar.ng_deps.dart':
|
||||
'two_annotations_files/expected/bar.ng_deps.dart'
|
||||
}),
|
||||
new IntegrationTestConfig(
|
||||
'should ensure that dependencies are property chained.',
|
||||
inputs: {
|
||||
'a|web/index.dart': 'chained_deps_files/index.dart',
|
||||
'a|web/foo.dart': 'chained_deps_files/foo.dart',
|
||||
'a|web/bar.dart': 'chained_deps_files/bar.dart'
|
||||
},
|
||||
outputs: {
|
||||
'a|web/bar.ng_deps.dart': 'chained_deps_files/expected/bar.ng_deps.dart',
|
||||
'a|web/foo.ng_deps.dart': 'chained_deps_files/expected/foo.ng_deps.dart'
|
||||
})
|
||||
];
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
library bar;
|
||||
|
||||
import 'package:angular2/src/core/annotations/annotations.dart';
|
||||
import 'foo.dart' as dep;
|
||||
|
||||
@Component(selector: '[soup]', services: const [dep.DependencyComponent])
|
||||
class MyComponent {
|
||||
MyComponent();
|
||||
}
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
library bar;
|
||||
|
||||
import 'bar.dart';
|
||||
import 'package:angular2/src/core/annotations/annotations.dart';
|
||||
import 'foo.dart' as dep;
|
||||
import 'foo.ng_deps.dart' as i0;
|
||||
|
||||
bool _visited = false;
|
||||
void setupReflection(reflector) {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
reflector
|
||||
..registerType(MyComponent, {
|
||||
'factory': () => new MyComponent(),
|
||||
'parameters': const [],
|
||||
'annotations': const [
|
||||
const Component(
|
||||
selector: '[soup]', services: const [dep.DependencyComponent])
|
||||
]
|
||||
});
|
||||
i0.setupReflection(reflector);
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
library foo;
|
||||
|
||||
import 'foo.dart';
|
||||
import 'package:angular2/src/core/annotations/annotations.dart';
|
||||
|
||||
bool _visited = false;
|
||||
void setupReflection(reflector) {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
reflector
|
||||
..registerType(DependencyComponent, {
|
||||
'factory': () => new DependencyComponent(),
|
||||
'parameters': const [],
|
||||
'annotations': const [const Component(selector: '[salad]')]
|
||||
});
|
||||
}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
library web_foo;
|
||||
|
||||
import 'package:angular2/src/core/application.dart';
|
||||
import 'package:angular2/src/reflection/reflection_capabilities.dart';
|
||||
import 'bar.dart';
|
||||
import 'a:web/bar.ng_deps.dart' as i0;
|
||||
|
||||
bool _visited = false;
|
||||
void setupReflection(reflector) {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
i0.setupReflection(reflector);
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
library foo;
|
||||
|
||||
import 'package:angular2/src/core/annotations/annotations.dart';
|
||||
|
||||
@Component(selector: '[salad]')
|
||||
class DependencyComponent {
|
||||
DependencyComponent();
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
library web_foo;
|
||||
|
||||
import 'package:angular2/src/core/application.dart';
|
||||
import 'package:angular2/src/reflection/reflection_capabilities.dart';
|
||||
import 'bar.dart';
|
||||
|
||||
void main() {
|
||||
reflector.reflectionCapabilities = new ReflectionCapabilities();
|
||||
bootstrap(MyComponent);
|
||||
}
|
||||
Reference in New Issue
Block a user