Index: third_party/pkg/angular/test/mock/test_bed_spec.dart |
diff --git a/third_party/pkg/angular/test/mock/test_bed_spec.dart b/third_party/pkg/angular/test/mock/test_bed_spec.dart |
index 19380a111ff3ddd5e04ce69a030bf5c3560429b7..e5817ca7b3fe18adba1c0991d2716981d83e6b87 100644 |
--- a/third_party/pkg/angular/test/mock/test_bed_spec.dart |
+++ b/third_party/pkg/angular/test/mock/test_bed_spec.dart |
@@ -2,38 +2,38 @@ library angular.mock.test_bed_spec; |
import '../_specs.dart'; |
-main() => |
-describe('test bed', () { |
- TestBed _; |
- Compiler $compile; |
- Injector injector; |
- Scope $rootScope; |
- |
- beforeEach(module((Module module) { |
- module..type(MyTestBedDirective); |
- return (TestBed tb) => _ = tb; |
- })); |
+void main() { |
+ describe('test bed', () { |
+ TestBed _; |
+ Compiler compile; |
+ Injector injector; |
+ Scope rootScope; |
+ |
+ beforeEachModule((Module module) { |
+ module..type(MyTestBedDirective); |
+ return (TestBed tb) => _ = tb; |
+ }); |
- it('should allow for a scope-based compile', () { |
+ it('should allow for a scope-based compile', () { |
- inject((Scope scope) { |
- Scope childScope = scope.createChild({}); |
+ inject((Scope scope) { |
+ Scope childScope = scope.createChild({}); |
- var element = $('<div my-directive probe="i"></div>'); |
- _.compile(element, scope: childScope); |
+ _.compile('<div my-directive probe="i"></div>', scope: childScope); |
- Probe probe = _.rootScope.context['i']; |
- var directiveInst = probe.directive(MyTestBedDirective); |
+ Probe probe = _.rootScope.context['i']; |
+ var directiveInst = probe.directive(MyTestBedDirective); |
- childScope.destroy(); |
+ childScope.destroy(); |
- expect(directiveInst.destroyed).toBe(true); |
+ expect(directiveInst.destroyed).toBe(true); |
+ }); |
}); |
- }); |
-}); |
+ }); |
+} |
-@NgDirective(selector: '[my-directive]') |
+@Decorator(selector: '[my-directive]') |
class MyTestBedDirective { |
bool destroyed = false; |