File tree 1 file changed +6
-8
lines changed
1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ describe("$interval", () => {
28
28
} , 1 ) ;
29
29
expect ( counter ) . toBe ( 0 ) ;
30
30
await wait ( 15 ) ;
31
- expect ( counter ) . toBeGreaterThanOrEqual ( 2 ) ;
31
+ expect ( counter ) . toBeGreaterThanOrEqual ( 1 ) ;
32
32
} ) ;
33
33
34
34
it ( "should call $apply after each task is executed" , ( done ) => {
@@ -138,13 +138,11 @@ describe("$interval", () => {
138
138
) ;
139
139
expect ( log ) . toEqual ( [ ] ) ;
140
140
141
- await wait ( 2 ) ;
142
- expect ( log ) . toEqual ( [
143
- "tick" ,
144
- "promise update: 0" ,
145
- "tick" ,
146
- "promise update: 1" ,
147
- ] ) ;
141
+ await wait ( 5 ) ;
142
+ expect ( log [ 0 ] ) . toEqual ( "tick" ) ;
143
+ expect ( log [ 1 ] ) . toEqual ( "promise update: 0" ) ;
144
+ expect ( log [ 2 ] ) . toEqual ( "tick" ) ;
145
+ expect ( log [ 3 ] ) . toEqual ( "promise update: 1" ) ;
148
146
} ) ;
149
147
150
148
it ( "should return a promise which will be resolved after the specified number of iterations" , async ( ) => {
You can’t perform that action at this time.
0 commit comments