Index: third_party/pkg/angular/test/jasmines_syntax_spec.dart |
diff --git a/third_party/pkg/angular/test/jasmines_syntax_spec.dart b/third_party/pkg/angular/test/jasmines_syntax_spec.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9fe6968fa5036ed497ebc0933dd758899962357a |
--- /dev/null |
+++ b/third_party/pkg/angular/test/jasmines_syntax_spec.dart |
@@ -0,0 +1,63 @@ |
+library jasmine_syntax_spec; |
+ |
+import 'jasmine_syntax.dart'; |
+import 'package:unittest/unittest.dart' as unit; |
+ |
+main() { |
+ describe('jasmine syntax', () { |
+ describe('beforeEach priority', () { |
+ var log = []; |
+ beforeEach(() { |
+ log.add("first p0"); |
+ }); |
+ |
+ beforeEach(() { |
+ log.add("p0"); |
+ }, priority: 0); |
+ |
+ beforeEach(() { |
+ log.add("p1"); |
+ }, priority: 1); |
+ |
+ it('should call beforeEach in the correct order', () { |
+ unit.expect(log.join(';'), unit.equals('p1;first p0;p0')); |
+ }); |
+ }); |
+ |
+ describe('beforeEach priority with nested describes', () { |
+ var log; |
+ beforeEach(() { |
+ log = []; |
+ }, priority: 2); |
+ |
+ beforeEach(() { |
+ log.add("p0Outer"); |
+ }, priority: 0); |
+ |
+ beforeEach(() { |
+ log.add("p1Outer"); |
+ }, priority: 1); |
+ |
+ it('should call beforeEach in the correct order', () { |
+ unit.expect(log.join(';'), unit.equals('p1Outer;p0Outer')); |
+ }); |
+ |
+ describe('inner', () { |
+ beforeEach(() { |
+ log.add("p0Inner"); |
+ }, priority: 0); |
+ |
+ beforeEach(() { |
+ log.add("p1Inner"); |
+ }, priority: 1); |
+ |
+ |
+ it('should call beforeEach in the correct order', () { |
+ unit.expect(log.join(';'), unit.equals('p1Outer;p1Inner;p0Outer;p0Inner')); |
+ }); |
+ }); |
+ |
+ |
+ }); |
+ }); |
+} |