refactor(dart/transform tests): Use actual directive def'n instead of mock.
In the transformer unit tests, we previously used a mock directive annotation. This update substitutes the actual Angular2 directive annotations. Closes #706
This commit is contained in:
@@ -2,7 +2,7 @@ library bar;
|
||||
|
||||
import 'package:angular2/src/core/annotations/annotations.dart';
|
||||
|
||||
@Directive(context: 'soup')
|
||||
class Component {
|
||||
Component();
|
||||
@Component(selector: '[soup]')
|
||||
class MyComponent {
|
||||
MyComponent();
|
||||
}
|
||||
|
||||
+3
-3
@@ -5,10 +5,10 @@ import 'index.dart' as i2;
|
||||
|
||||
main() {
|
||||
reflector
|
||||
..registerType(i0.Component, {
|
||||
"factory": () => new i0.Component(),
|
||||
..registerType(i0.MyComponent, {
|
||||
"factory": () => new i0.MyComponent(),
|
||||
"parameters": const [const []],
|
||||
"annotations": const [const i1.Directive(context: 'soup')]
|
||||
"annotations": const [const i1.Component(selector: '[soup]')]
|
||||
});
|
||||
i2.main();
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@ library web_foo;
|
||||
import 'bar.dart';
|
||||
|
||||
void main() {
|
||||
new Component('Things');
|
||||
new MyComponent('Things');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user