| Index: third_party/pkg/angular/test/core_dom/compiler_spec.dart
|
| diff --git a/third_party/pkg/angular/test/core_dom/compiler_spec.dart b/third_party/pkg/angular/test/core_dom/compiler_spec.dart
|
| index 23d7464885e6d62e2ff3eb454f36970f976bafb0..102f71946661955a138542027dd0e9079a2432f0 100644
|
| --- a/third_party/pkg/angular/test/core_dom/compiler_spec.dart
|
| +++ b/third_party/pkg/angular/test/core_dom/compiler_spec.dart
|
| @@ -93,7 +93,6 @@ main() => describe('dte.compiler', () {
|
| it('should compile text', inject((Compiler $compile) {
|
| var element = $('<div>{{name}}<span>!</span></div>').contents();
|
| element.remove(null);
|
| - print('test');
|
|
|
| var template = $compile(element);
|
|
|
| @@ -442,6 +441,29 @@ main() => describe('dte.compiler', () {
|
| expect(element.textWithShadow()).toEqual('WORKED');
|
| })));
|
| });
|
| +
|
| + describe('invalid components', () {
|
| + it('should throw a useful error message for missing selectors', () {
|
| + module((Module module) {
|
| + module
|
| + ..type(MissingSelector);
|
| + });
|
| + expect(() {
|
| + inject((Compiler c) { });
|
| + }).toThrow('Missing selector annotation for MissingSelector');
|
| + });
|
| +
|
| +
|
| + it('should throw a useful error message for invalid selector', () {
|
| + module((Module module) {
|
| + module
|
| + ..type(InvalidSelector);
|
| + });
|
| + expect(() {
|
| + inject((Compiler c) { });
|
| + }).toThrow('Unknown selector format \'buttonbar button\' for InvalidSelector');
|
| + });
|
| + });
|
| });
|
|
|
|
|
| @@ -720,3 +742,9 @@ class MyController {
|
| }
|
| }
|
|
|
| +@NgComponent()
|
| +class MissingSelector {}
|
| +
|
| +@NgComponent(selector: 'buttonbar button')
|
| +class InvalidSelector {}
|
| +
|
|
|