Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: third_party/pkg/angular/test/core_dom/compiler_spec.dart

Issue 148453003: Updating Angular version (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 {}
+
« no previous file with comments | « third_party/pkg/angular/test/core/scope_spec.dart ('k') | third_party/pkg/angular/test/core_dom/cookies_spec.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698