| Index: third_party/pkg/angular/test/io/source_metadata_extractor_spec.dart
|
| diff --git a/third_party/pkg/angular/test/io/source_metadata_extractor_spec.dart b/third_party/pkg/angular/test/io/source_metadata_extractor_spec.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9cd9442f2e730ee45464ffa13743c9f8700f7a61
|
| --- /dev/null
|
| +++ b/third_party/pkg/angular/test/io/source_metadata_extractor_spec.dart
|
| @@ -0,0 +1,26 @@
|
| +library ng.tool.source_metadata_extractor_spec;
|
| +
|
| +import 'package:angular/tools/common.dart';
|
| +import 'package:angular/tools/source_crawler_impl.dart';
|
| +import 'package:angular/tools/source_metadata_extractor.dart';
|
| +import '../jasmine_syntax.dart';
|
| +import 'package:unittest/unittest.dart';
|
| +
|
| +main() => describe('source_metadata_extarctor', () {
|
| + it('should extract all attribute mappings including annotations', () {
|
| + var sourceCrawler = new SourceCrawlerImpl(['packages/']);
|
| + var sourceMetadataExtractor = new SourceMetadataExtractor(sourceCrawler);
|
| + List<DirectiveInfo> directives =
|
| + sourceMetadataExtractor
|
| + .gatherDirectiveInfo('test/io/test_files/main.dart');
|
| +
|
| + expect(directives, hasLength(2));
|
| +
|
| + DirectiveInfo info = directives.elementAt(1);
|
| + expect(info.expressionAttrs, unorderedEquals(['expr', 'another-expression',
|
| + 'callback', 'two-way-stuff', 'exported-attr']));
|
| + expect(info.expressions, unorderedEquals(['attr', 'expr',
|
| + 'anotherExpression', 'callback', 'twoWayStuff',
|
| + 'exported + expression']));
|
| + });
|
| +});
|
|
|