| 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
|
| index 808da469e04466787ae743a2940ddce77706a994..af9f2655ed08d4068ac2de9349a37f37c83ecb0c 100644
|
| --- a/third_party/pkg/angular/test/io/source_metadata_extractor_spec.dart
|
| +++ b/third_party/pkg/angular/test/io/source_metadata_extractor_spec.dart
|
| @@ -6,36 +6,21 @@ import 'package:angular/tools/source_metadata_extractor.dart';
|
| import '../jasmine_syntax.dart';
|
| import 'package:unittest/unittest.dart';
|
|
|
| -void main() {
|
| - describe('source_metadata_extractor', () {
|
| - it('should extract all attribute mappings including annotations', () {
|
| - var sourceCrawler = new SourceCrawlerImpl(['packages/']);
|
| - var sourceMetadataExtractor = new SourceMetadataExtractor();
|
| - List<DirectiveInfo> directives = sourceMetadataExtractor
|
| - .gatherDirectiveInfo('test/io/test_files/main.dart', sourceCrawler);
|
| +main() => describe('source_metadata_extractor', () {
|
| + it('should extract all attribute mappings including annotations', () {
|
| + var sourceCrawler = new SourceCrawlerImpl(['packages/']);
|
| + var sourceMetadataExtractor = new SourceMetadataExtractor();
|
| + List<DirectiveInfo> directives =
|
| + sourceMetadataExtractor
|
| + .gatherDirectiveInfo('test/io/test_files/main.dart', sourceCrawler);
|
|
|
| - expect(directives.map((d) => d.selector),
|
| - unorderedEquals(['[ng-if]', 'my-component']));
|
| + 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']));
|
| - });
|
| -
|
| - it('should extract ngRoute templates from ngRoute viewHtml', () {
|
| - var sourceCrawler = new SourceCrawlerImpl(['packages/']);
|
| - var sourceMetadataExtractor = new SourceMetadataExtractor();
|
| - List<DirectiveInfo> directives = sourceMetadataExtractor
|
| - .gatherDirectiveInfo('test/io/test_files/routing.dart', sourceCrawler);
|
| -
|
| - var templates = directives
|
| - .where((i) => i.selector == null)
|
| - .map((i) => i.template);
|
| - expect(templates, hasLength(2));
|
| - expect(templates,
|
| - unorderedEquals(['<div ng-if="foo"></div>', '<div ng-if="bar"></div>']));
|
| - });
|
| + 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']));
|
| });
|
| -}
|
| +});
|
|
|