| Index: third_party/pkg/angular/test/tools/html_extractor_spec.dart
|
| diff --git a/third_party/pkg/angular/test/tools/html_extractor_spec.dart b/third_party/pkg/angular/test/tools/html_extractor_spec.dart
|
| deleted file mode 100644
|
| index 399a64b28634a4eb8037353ff462a303721be294..0000000000000000000000000000000000000000
|
| --- a/third_party/pkg/angular/test/tools/html_extractor_spec.dart
|
| +++ /dev/null
|
| @@ -1,92 +0,0 @@
|
| -library html_extractor_spec;
|
| -
|
| -import 'package:angular/tools/common.dart';
|
| -import 'package:angular/tools/html_extractor.dart';
|
| -import 'package:unittest/unittest.dart';
|
| -
|
| -import '../jasmine_syntax.dart';
|
| -import 'mock_io_service.dart';
|
| -
|
| -main() => describe('html_extractor', () {
|
| -
|
| - it('should extract text mustache expressions', () {
|
| - var ioService = new MockIoService({
|
| - 'foo.html': r'''
|
| - <div>foo {{ctrl.bar}} baz {{aux}}</div>
|
| - '''
|
| - });
|
| -
|
| - var extractor = new HtmlExpressionExtractor([]);
|
| - extractor.crawl('/', ioService);
|
| - expect(extractor.expressions.toList()..sort(),
|
| - equals(['aux', 'ctrl.bar']));
|
| - });
|
| -
|
| - it('should extract attribute mustache expressions', () {
|
| - var ioService = new MockIoService({
|
| - 'foo.html': r'''
|
| - <div foo="foo-{{ctrl.bar}}" baz="{{aux}}-baz"></div>
|
| - '''
|
| - });
|
| -
|
| - var extractor = new HtmlExpressionExtractor([]);
|
| - extractor.crawl('/', ioService);
|
| - expect(extractor.expressions.toList()..sort(),
|
| - equals(['aux', 'ctrl.bar']));
|
| - });
|
| -
|
| - it('should extract ng-repeat expressions', () {
|
| - var ioService = new MockIoService({
|
| - 'foo.html': r'''
|
| - <div ng-repeat="foo in ctrl.bar"></div>
|
| - '''
|
| - });
|
| -
|
| - var extractor = new HtmlExpressionExtractor([]);
|
| - extractor.crawl('/', ioService);
|
| - expect(extractor.expressions.toList()..sort(),
|
| - equals(['ctrl.bar']));
|
| - });
|
| -
|
| - it('should extract expressions provided in the directive info', () {
|
| - var ioService = new MockIoService({});
|
| -
|
| - var extractor = new HtmlExpressionExtractor([
|
| - new DirectiveInfo('', [], ['foo', 'bar'])
|
| - ]);
|
| - extractor.crawl('/', ioService);
|
| - expect(extractor.expressions.toList()..sort(),
|
| - equals(['bar', 'foo']));
|
| - });
|
| -
|
| - it('should extract expressions from expression attributes', () {
|
| - var ioService = new MockIoService({
|
| - 'foo.html': r'''
|
| - <foo bar="ctrl.baz"></foo>
|
| - '''
|
| - });
|
| -
|
| - var extractor = new HtmlExpressionExtractor([
|
| - new DirectiveInfo('foo', ['bar'])
|
| - ]);
|
| - extractor.crawl('/', ioService);
|
| - expect(extractor.expressions.toList()..sort(),
|
| - equals(['ctrl.baz']));
|
| - });
|
| -
|
| - it('should ignore ng-repeat while extracting attribute expressions', () {
|
| - var ioService = new MockIoService({
|
| - 'foo.html': r'''
|
| - <div ng-repeat="foo in ctrl.bar"></div>
|
| - '''
|
| - });
|
| -
|
| - var extractor = new HtmlExpressionExtractor([
|
| - new DirectiveInfo('[ng-repeat]', ['ng-repeat'])
|
| - ]);
|
| - extractor.crawl('/', ioService);
|
| - // Basically we don't want to extract "foo in ctrl.bar".
|
| - expect(extractor.expressions.toList()..sort(),
|
| - equals(['ctrl.bar']));
|
| - });
|
| -});
|
|
|