@@ -654,7 +654,7 @@ void main() {
654
654
655
655
656
656
it ('should skip scopes which dont have given event' ,
657
- inject ( (RootScope rootScope, Logger log) {
657
+ (RootScope rootScope, Logger log) {
658
658
var child1 = rootScope.createChild ('A' );
659
659
rootScope.createChild ('A1' );
660
660
rootScope.createChild ('A2' );
@@ -663,7 +663,7 @@ void main() {
663
663
child2.on ('event' ).listen ((e) => log (e.data));
664
664
rootScope.broadcast ('event' , 'OK' );
665
665
expect (log).toEqual (['OK' ]);
666
- })) ;
666
+ });
667
667
});
668
668
669
669
@@ -847,14 +847,14 @@ void main() {
847
847
});
848
848
849
849
850
- it (r'should execute and return value and update' , inject (
851
- (RootScope rootScope, ExceptionHandler e) {
852
- LoggingExceptionHandler exceptionHandler = e;
853
- rootScope.context['name' ] = 'abc' ;
854
- expect (rootScope.apply ((context) => context['name' ])).toEqual ('abc' );
855
- expect (log).toEqual ('digest;digest;' );
856
- exceptionHandler.assertEmpty ();
857
- }) );
850
+ it (r'should execute and return value and update' ,
851
+ (RootScope rootScope, ExceptionHandler e) {
852
+ LoggingExceptionHandler exceptionHandler = e;
853
+ rootScope.context['name' ] = 'abc' ;
854
+ expect (rootScope.apply ((context) => context['name' ])).toEqual ('abc' );
855
+ expect (log).toEqual ('digest;digest;' );
856
+ exceptionHandler.assertEmpty ();
857
+ } );
858
858
859
859
860
860
it (r'should execute and return value and update' , (RootScope rootScope) {
@@ -924,14 +924,14 @@ void main() {
924
924
exceptionHandler.assertEmpty ();
925
925
});
926
926
927
- it (r'should execute and return value and update' , inject (
928
- (RootScope rootScope, ExceptionHandler e) {
929
- LoggingExceptionHandler exceptionHandler = e;
930
- rootScope.context['name' ] = 'abc' ;
931
- expect (rootScope.apply ((context) => context['name' ])).toEqual ('abc' );
932
- expect (log).toEqual ('digest;digest;' );
933
- exceptionHandler.assertEmpty ();
934
- }) );
927
+ it (r'should execute and return value and update' ,
928
+ (RootScope rootScope, ExceptionHandler e) {
929
+ LoggingExceptionHandler exceptionHandler = e;
930
+ rootScope.context['name' ] = 'abc' ;
931
+ expect (rootScope.apply ((context) => context['name' ])).toEqual ('abc' );
932
+ expect (log).toEqual ('digest;digest;' );
933
+ exceptionHandler.assertEmpty ();
934
+ } );
935
935
936
936
it (r'should execute and return value and update' , (RootScope rootScope) {
937
937
rootScope.context['name' ] = 'abc' ;
@@ -1092,23 +1092,22 @@ void main() {
1092
1092
});
1093
1093
1094
1094
1095
- it (r'should run digest multiple times' , inject (
1096
- (RootScope rootScope) {
1097
- // tests a traversal edge case which we originally missed
1098
- var log = [];
1099
- var childA = rootScope.createChild ({'log' : log});
1100
- var childB = rootScope.createChild ({'log' : log});
1095
+ it (r'should run digest multiple times' , (RootScope rootScope) {
1096
+ // tests a traversal edge case which we originally missed
1097
+ var log = [];
1098
+ var childA = rootScope.createChild ({'log' : log});
1099
+ var childB = rootScope.createChild ({'log' : log});
1101
1100
1102
- rootScope.context['log' ] = log;
1101
+ rootScope.context['log' ] = log;
1103
1102
1104
- rootScope.watch ("log.add('r')" , (_, __) => null );
1105
- childA.watch ("log.add('a')" , (_, __) => null );
1106
- childB.watch ("log.add('b')" , (_, __) => null );
1103
+ rootScope.watch ("log.add('r')" , (_, __) => null );
1104
+ childA.watch ("log.add('a')" , (_, __) => null );
1105
+ childB.watch ("log.add('b')" , (_, __) => null );
1107
1106
1108
- // init
1109
- rootScope.digest ();
1110
- expect (log.join ('' )).toEqual ('rabrab' );
1111
- }) );
1107
+ // init
1108
+ rootScope.digest ();
1109
+ expect (log.join ('' )).toEqual ('rabrab' );
1110
+ } );
1112
1111
1113
1112
1114
1113
it (r'should repeat watch cycle while model changes are identified' , (RootScope rootScope) {
@@ -1165,7 +1164,7 @@ void main() {
1165
1164
});
1166
1165
1167
1166
1168
- it (r'should return a function that allows listeners to be unregistered' , inject (
1167
+ it (r'should return a function that allows listeners to be unregistered' ,
1169
1168
(RootScope rootScope) {
1170
1169
var listener = guinness.createSpy ('watch listener' );
1171
1170
var watch;
@@ -1185,7 +1184,7 @@ void main() {
1185
1184
watch.remove ();
1186
1185
rootScope.digest (); //trigger
1187
1186
expect (listener).not.toHaveBeenCalled ();
1188
- })) ;
1187
+ });
1189
1188
1190
1189
1191
1190
it (r'should be possible to remove every watch' ,
@@ -1228,7 +1227,7 @@ void main() {
1228
1227
1229
1228
1230
1229
it (r'should always call the watchr with newVal and oldVal equal on the first run' ,
1231
- inject ( (RootScope rootScope) {
1230
+ (RootScope rootScope) {
1232
1231
var log = [];
1233
1232
var logger = (newVal, oldVal) {
1234
1233
var val = (newVal == oldVal || (newVal != oldVal && oldVal != newVal)) ? newVal : 'xxx' ;
@@ -1253,7 +1252,7 @@ void main() {
1253
1252
log = [];
1254
1253
rootScope.digest ();
1255
1254
expect (log).toEqual ([]);
1256
- })) ;
1255
+ });
1257
1256
1258
1257
1259
1258
it ('should properly watch constants' , (RootScope rootScope, Logger log) {
0 commit comments